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