#include<bits/stdc++.h>
using namespace std;
int n, m, k; 
int main() {
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	cin >> n >> m >> k;
	int cnt = 1, x = 1, y = n;
	while (cnt < k) {
		cnt++;
		if (cnt % m == 1) {
			y -= m;
			x = cnt / m + 1;
		}
		else {
			x++;
			y++;
		}
	}
	cout << x << ' ' << y;
	return 0;
}