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