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