#include<bits/stdc++.h> using namespace std; int n, m, k; int get_row(int x){ if(x % m == 0)return x / m; return x / m + 1; } int get_col(int x){ if(x % m == 0)return m; else return x % m; } int main(){ cin>>n>>m>>k; int row = get_row(k), col = get_col(k); int now = col, ans1 = col, ans2 = col; while(now < k){ now += m; ans1++; } now = (n - 1) * m + col; while(now > k){ now -= m; ans2++; } cout<<ans1<<' '<<ans2; }