#include<bits/stdc++.h> using namespace std; #define int long long const int N = 32770; int n, m, k, t = 1, s = 5; int mp_x[N], mp_y[N]; signed main(){ ios::sync_with_stdio(false); cin.tie(0), cout.tie(0); cin >> n >> m >> k; for(int i = 1; i <= n * m; i++){ if(t < m) mp_x[t] = t % m; else mp_x[t] = t / m + 1; t++; } t = 1; for(int j = 1; j <= m; j++){ t = j; for(int x = 1; x <= n; x++){ mp_y[t] = (s - mp_x[t]); t += m; } s += 2; } cout << mp_x[k] << ' ' << mp_y[k] << '\n'; return 0; }