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