#include<bits/stdc++.h>

using namespace std;

signed main() {
	int n, m, k;
	cin >> n >> m >> k;
	k--;
	int x = k / m, y = k % m;
	cout << x + y + 1 << ' ' << n - x + y;
}