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