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