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