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