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