#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e5 + 20;
int main() {
  long long n, i, j, m, k, x, y;
  cin >> n >> m >> k;
  if (k <= n - 1) {
    y = 1;
    x = k + 1;
    cout << x << ' ' << y;
    return 0;
  }
  if (k <= m + n - 2) {
    x = n;
    y = k - n + 2;
    cout << x << ' ' << y;
    return 0;
  }
  k -= (n + m - 2);
  x = n - (ceil((long double)k / (long double)(m - 1)));
  if (x & 1) {
    if (k % (m - 1) == 0)
      y = 2;
    else
      y = m - (k % (m - 1)) + 1;
  } else {
    if (k % (m - 1) == 0)
      y = m;
    else
      y = k % (m - 1) + 1;
  }
  cout << x << ' ' << y;
  return 0;
}
