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