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