#include <bits/stdc++.h>
using namespace std;
int main(){
	long long n,m,k;
	scanf("%lld%lld%lld" ,&n,&m,&k);
	long long first_x=0,first_y=0;
	if (k%m==0){
		first_x=k/m;
	}
	else{
		first_x=k/m+1;
	}
	if (k%m==0){
		first_y=m;
	}
	else{
		first_y=k%m;
	}
	long long ans_x=first_x+first_y-1;
	long long ans_y=first_y+(n-first_x);
	printf("%lld %lld" ,ans_x,ans_y);
	return 0;
}