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