#include <bits/stdc++.h>
using namespace std;
const int N = 4e4 + 5; 
int n, m, k, sum;
struct Node {
	int id, x, y, nx, ny;
}a;
signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	cin >> n >> m >> k;
	for (int i = 1; i <= n; i++) 
		for (int j = 1; j <= m; j++) {
			sum++;
			if (sum == k) a.x = i, a.y = j;
		}
	a.nx = a.x + a.y - 1; a.ny = a.y - a.x + n;
	cout << a.nx << " " << a.ny;
	return 0;
}