#include<bits/stdc++.h>//Ô¤¹À£º³¬Ê± 
using namespace std;
int main(){
	int n,m,k,x,y,cnt=0;
	cin>>n>>m>>k;
	bool sb=false;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=m;j++){
			cnt++;
			if(cnt==k){
				x=i;
				y=j;
				sb=true;
				break;
			}
		}
		if(sb==true){
			break;
		}
	}
	cout<<x+y-1<<' '<<n-x+y;
	return 0;
}
/*
(1,1) -> (1,4)
(1,2) -> (2,5)
(1,3) -> (3,6)
(2,1) -> (2,3)
(2,2) -> (3,4)
(2,3) -> (4,5)
(3,1) -> (3,2)
(3,2) -> (4,3)
......
(X,Y) -> (X+Y-1,N-X+Y)
*/