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