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