#include<bits/stdc++.h>
using namespace std;
#define int long long
string szp(int n,int p){
	if(n==0) return "0";
	string s="";
	while(n){
		int g=n%p;
		if(g>=10) s=char(g+55)+s;
		else s=char(g+48)+s;
		n/=p;
	}
	return s;
}
int pzs(string s,int p){
	int h=0,w=1;
	for(int i=s.size()-1;i>=0;i--){
		if(isdigit(s[i])) h+=(int)(s[i]-48)*w;
		else h+=(int)(s[i]-55)*w;
		w*=p;
	}
	return h;
}


signed main()
{
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);

	int n,m,k,i,j,t=1;
	cin>>n>>m>>k;
	i=1; j=n;
	while(t<k){
		i++; j++;
		if(t%m==0) i-=m-1,j-=m+1;
		t++;
	}
	cout<<i<<' '<<j;
	return 0;
}