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