#include<bits/stdc++.h>
using namespace std;
int main(){
	long long n,m,k,tot=0;
	cin>>n>>m>>k;
	for(int i=1;i<=n;i++){
		if(tot+m<k){
			tot+=m;
			continue;
		}
		for(int j=0;j<m;j++){
			tot++; 
			if(tot==k){
				cout<<i+j<<' '<<n-i+1+j<<endl;
				break;
			}
		} 
	}
	return 0;
}