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