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