#include<bits/stdc++.h>
using namespace std;
int a1[10001][10001];
int main(){
	int a,b,x;
	cin>>a>>b>>x;
	int c=1,x1=1,x2;
	for(int j=1;j<=b;j++){
		x2=j+a;
		a1[j][1]=a1[x2][x1];
		x1++;
	}
	for(int i=1;i<=a;i++){
		for(int j=1;j<=b;j++){
			a1[j][i]=c;
			c++;
		}
	}
	for(int i=1;i<=a;i++){
		for(int j=1;j<=b;j++){
			if(a1[j][i]==x){
				cout<<j<<' '<<i;
				return 0;
			}
		}
	}
}