#include <bits/stdc++.h>
using namespace std;
long long a[200010];
map<long long, long long> mp;
map<long long, long long> mp1;
map<long long, long long> mp2;
int main() {
  cin.sync_with_stdio(false);
  long long i, j, k, l, c, v, b, bv[1000], aa[1009], bb[1000], n, m, r, t, e, p,
      q, f;
  long long x1, x2, y1, y2, x3, x4, x5, x6;
  string s, s1, s2, s3, ss[10000];
  while (cin >> n) {
    cin >> m >> k;
    b = n * m;
    {
      if (k <= (n - 1)) {
        cout << k + 1 << " 1";
        return 0;
      } else {
        l = 0;
        k -= n - 1;
        v = k / (m - 1);
        if (k % (m - 1) == 0) {
          if (v % 2 == 0) {
            cout << n - v + 1 << " 2";
          } else {
            cout << n - v + 1 << " " << m;
          }
        } else {
          if (v % 2 == 0) {
            k = k % (m - 1);
            cout << n - v << " " << (k + 1);
          } else {
            k = k % (m - 1);
            cout << n - v << " " << m - k + 1;
          }
        }
      }
    }
  }
}
