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