#include<bits/stdc++.h> 
using namespace std;
int main(){
	int n,m,k;
	cin>>n>>m>>k;
	vector<vector<long long> >play(n,vector<long long>(m));
	int x=k/m;
	int xx=k%m;
	if (xx==0){
		x=x+2;
	}
	else{
		x=x+xx;
	}
	int ci=0 ;
	int ex=0,ey=0;
	bool go=true;
	for (int i=0;i<n;i++){
		if (go){
			for(int j=0;j<m;j++){
				ci++;
				if (ci==k){
					ex=i;
					ey=j;
					go=false;
					break;
				}
			}
		}
	}
	int y=n-ex+ey;
	cout<<x<<' '<<y<<endl;
	
	return 0;
}