#include<bits/stdc++.h>
using namespace std;
int n,m,k;
int ro,co;
int main(){
	cin>>n>>m>>k;
	if(k%m)
	{
		co=k%m;
		ro=k/m+1;
	}
	else
	{
		co=m;
		ro=k/m;
	}
	cout<<(ro+co-1)<<" "<<(n-ro+1+co-1);
	
	return 0;
}