#include <bits/stdc++.h>
const static long long INF = 98765432100LL;
static inline void setio(void);
int main(void) {
  setio();
  long long n, m, k;
  std::cin >> n >> m >> k;
  if (k < n) {
    std::cout << k + 1 << " 1\n";
    return 0;
  }
  k -= n;
  long long row = n - k / (m - 1);
  std::cout << row << " ";
  if (k % (2 * (m - 1)) >= m - 1) {
    std::cout << (m - (k % (m - 1))) << "\n";
  } else {
    std::cout << (k % (m - 1)) + 2 << "\n";
  }
  return 0;
}
static inline void setio(void) {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  std::cout.precision(10);
  std::cout << std::fixed;
}
