#include<bits/stdc++.h>
#define int long long
using namespace std;


signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int n,m,k;
    cin>>n>>m>>k;
    int x=k/m;
    if(k%m!=0) x++;
    int y=k%m;
    if(y==0) y=m;
    cout<<x+y-1<<" "<<n-x+1+y-1;
	return 0;
}