#include<bits/stdc++.h> using namespace std; #define gg long long int main(){ ios::sync_with_stdio(false),cin.tie(0),cout.tie(0); gg n,m,k,h,l; cin>>n>>m>>k; if(k%n==0) h=k/m,l=m; else h=k/m+1,l=k%m; cout<<h+(l-1)<<" "<<n-(h-(l-1))+1; return 0; }