#include <bits/stdc++.h>
using namespace std;
int main()
{
	long long n,m,k,jl,h,l,s;
	cin>>n>>m>>k;
	jl=k%m;
	if(jl==0)
	{
		jl=m;
	}
	s=n*m-(m-jl);
	l=jl+(s-k)/m;
	h=jl+(k-1)/m;
	cout<<h<<' '<<l;
	return 0;
}