#include<bits/stdc++.h>
using namespace std;
long long n, m, k, t, x, y, c, d;
int main(){
	cin >> n >> m >> k;
	for(int i = 1; i <= n; i++){
		for(int j = 1; j <= m; j++){
			t += 1;
			if(t == k) x = i, y = j;
		}
	}
	
	c = x, d = n - x + 1;
	long long v = y - 1;
	c += v, d += v;
	cout << c << " " << d;
	
	return 0;
}