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