#include<iostream> using namespace std; int main(){ int n,m,k; cin>>n>>m>>k; int x,y; x=k/m+1; y=k%m; cout<<x+y-1<<' '<<n-x+y; }