#include<bits/stdc++.h>
using namespace std;

int x,y,l;
void xuanzhuan(int s) {
	int j=x,i=1,z=0,k=2,f=x-1;
	while (z<=s) {
		z++;

		if (z!=1) {
			if (z%y==1) {
				i=k;
				j=f;
				k++;
				f--;
			} else {
				i++;
				j++;
			}
		}

		if (l==z) {
			cout<<i<<" "<<j;
			exit(0);
		}
	}
	return ;
}
int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	cin>>x>>y>>l;
	int s=0;
	s=x*y;
	xuanzhuan(s);

	return 0;
}