#include<bits/stdc++.h> using namespace std; #define int long long signed main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n,m,k; cin>>n>>m>>k; int x=(k-1)/m+1,y; if(k%m==0) y=m; else y=k%m; cout<<x+y-1<<' '<<y+(n-x); return 0; }