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