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