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