#include  <bits/stdc++.h>
#define int long long
using namespace std;
signed main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
    int n,m,k;
	cin>>n>>m>>k;
	if(m%2!=0)
	{
		cout<<(k/m+1)+(m/2-1)<<" "<<k%m+1;
	}
	else
    {
    	cout<<(k/m+1)+(m/2)<<" "<<k%m+1;
	}
    return 0;
}