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