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