#include <bits/stdc++.h>
using namespace std;
long long n, m, k, x, y;
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> k;
  if (k < n) {
    cout << k + 1 << " " << 1 << endl;
    return 0;
  }
  x = n;
  y = 2;
  if (k == n) {
    cout << n << " " << 2 << endl;
    return 0;
  }
  k -= n;
  long long whole = k / (2 * m - 2), left = k % (2 * m - 2);
  x -= whole * 2;
  k = left;
  if (k <= m - 2) {
    cout << x << " " << k + 2 << endl;
    return 0;
  }
  k -= m - 2 + 1;
  cout << x - 1 << " " << m - k << endl;
  return 0;
}
