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