#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

signed main(){
	//freopen("xxx.in","r",stdin);
	//freopen("xxx.out","w",stdout);
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	ll n,m,k;cin>>n>>m>>k;
	ll kx=(k-1)/m+1;
	ll ky=(k-1)%m+1;
	ll sm=kx+ky;
	ll rm=kx-ky;
	ll mns=2,mxr=n-1;
	cout<<(sm-mns+1)<<" "<<(mxr-rm+1);
	return 0;
}