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