#include <bits/stdc++.h>
#define int long long
using namespace std;

signed main(){
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	int n,m,k;
	cin>>n>>m>>k;
	int x,y;
	if(k%m==0)x=k/m;
	else x=k/m+1;
	if(k%m==0)y=m;
	else y=k%m;
	//Çó×ø±ê 
	int r=y,c=x-1;
	cout<<r+c<<' ';//ÐýתµÄx 
	cout<<r-c+n-1;//ÐýתµÄy 
	return 0;
}
//¶þά±¬¿Õ¼ä