//#include<bits/stdc++.h>
//using namespace std;
//#define int long long
//int read(){
//	int x=0;
//	char c=getchar();
//	char f=1;
//	while(!isdigit(c)){
//		f&=(x!='-');
//		c=getchar();
//	}
//	while(isdigit(c)){
//		x=(x<<1)+(x<<3)+(c^48);
//		c=getchar();
//	}
//	x=f?x:-x;
//	return x;
//}
//const int N=32800;
//int n,m,k;
//signed main(){
//	n=4,m=3,k=read();
////	n=read(),m=read(),k=read();
//	int x=k/m+(k%m!=0),y=k%m;
//	cerr<<"x: "<<x<<" y: "<<y<<'\n';
//	if(x<n){
//		cout<<x<<" "<<(n+m-1)-((k+(x-1))/x*2-1)+1<<'\n';
//	} else{
//		cout<<(n+m-1)-y+1<<" ";
//	}
//}
#include<bits/stdc++.h>
using namespace std;
int n,m,k;
int main(){
	cin>>n>>m>>k;
	int a[105][105],b[105][105];
	for(int i=1;i<=n;i++){
		int tot=i;
		for(int j=1;j<=m;j++){
			a[i][j]=tot++;
		}
	}
	for(int i=n;i>=1;i--){
		int tot=n-i+1;
		for(int j=1;j<=m;j++){
			b[i][j]=tot++;
		}
	}
//	for(int i=1;i<=n;i++){
//		for(int j=1;j<=m;j++){
//			cerr<<a[i][j]<<" ";
//		}cerr<<'\n';
//	}cerr<<'\n';
	int x=k/m+(k%m!=0),y=k%m;
	cout<<a[x][y]<<" "<<b[x][y];
}