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