#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,m,k;
	cin>>n>>m>>k;
	/*
	1,1=1,4   1,2=2,5   1,3=3,6
	2,1=2,3   2,2=3,4   2,3=4,5
	3,1=3,2   3,2=4,3   3,3=5,4
	4,1=4,1   4,2=5,2   4,3=6,3
	*/
	int x=k/m+1,y=k%m;
	if(k%m==0){
		x=k/m;
		y=m;
	}
	int r=x+y-1,c=(n+2*y-1)-r;
	cout<<r<<" "<<c;
	return 0;
}