#include<bits/stdc++.h>
using namespace std;
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0); 
	int n,m,k;
	cin>>n>>m>>k;
	int o=k/m;
	int p=k%m;
	o++;
	cout<<o+p-1<<" "<<n+p-o<<endl;
	return 0;
}