#include<bits/stdc++.h>
using namespace std;
struct s{
	int x;
	int y;
	long long c; 
};
int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	long long n,m,k,c=1;
	cin>>n>>m>>k;
	
	for(int i=0;i<n;i++){
		for(int j=0;j<n;j++){
			if(c==k){
				cout<<n-i+j-2<<' '<<m-j+i;
			}
			c++;
		}
	}
	return 0;
}