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