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