#include <bits/stdc++.h> using namespace std; #define LL long long const int N = 1e6 + 10; int n, m, k; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> n >> m >> k; int x, y; x = k / m; y = k % m; if (y != 0) x++; else y = m; if (y == 1) cout << x << " "; else cout << x + (y - 1) << " "; if (y == 1) cout << n - x + 1; else cout << n - x + 1 + (y - 1); return 0; }