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

#define int long long
signed main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	int n,m,k;
	cin >> n >> m >> k;
	int qsh=1,qsl=n;
	int kh=0,kl=0;
	if(k%m==0)
	{
		kh=k/m;
		kl=m;
	}
	else
	{
		kh=k/m+1;
		kl=k%m;
	}
	
	int xkh=kh+(kl-1);
	qsl=qsl-(kh-1);
	int xkl=qsl+(kl-1);
	cout << xkh << " " << xkl;
	return 0;
}