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