#include <bits/stdc++.h>
int main(int argc, const char* argv[]) {
  long long n, m, k;
  std::cin >> n >> m >> k;
  if (k >= n) {
    m--;
    k -= n;
    long long r = k / m;
    long long c = k % m;
    if (r % 2 == 0)
      std::cout << n - r << " " << c + 2 << std::endl;
    else
      std::cout << n - r << " " << m - c + 1 << std::endl;
  } else
    std::cout << k + 1 << " " << 1 << std::endl;
  return 0;
}
