#include<bits/stdc++.h>
#define int long long
#define double long double
#define debug(x) cout<<#x<<"->"<<x<<endl<<flush
#define endl '\n'
#define inf INT_MAX
using namespace std;
const int N=1e6+7;
const int M=1e6+7;
const int mod=1e9+7;
const double eps=1e-3;
signed main(){
	ios::sync_with_stdio(0);
	ios_base::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	int n,m,k;cin >>n>>m>>k;
	int x=(n-1)*m+1,y=n,z=1;
	int a,b;
	for(int i=1;i<=n+m-1;i++){
		if((k-x)%(m+1)==0){
			b=z;
			a=y+(k-x)/(m+1)*2;
			break;
		}
		if(i<=n-1)x-=m;
		else x++;
		if(i<=n-1)y--;
		else y++;
		z++;
	}
	cout<<a<<" "<<b;
	return 0;
}