#include <bits/stdc++.h>
using namespace std;
template <class T>
void printVector(const vector<T>& res) {
  if (res.empty()) {
    cout << "Empty vector" << endl;
    return;
  }
  copy(res.begin(), res.end(), ostream_iterator<T>(std::cout, " "));
  cout << endl;
}
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  if (k < n) {
    cout << k + 1 << " " << 1 << endl;
    return 0;
  }
  k -= n - 1;
  long long fullRows = k / (m - 1);
  long long remainder = k % (m - 1);
  if (fullRows % 2 > 0) {
    if (remainder > 0) {
      cout << n - fullRows << " " << m - remainder + 1 << endl;
    } else {
      cout << n - fullRows + 1 << " " << m << endl;
    }
  } else {
    if (remainder > 0) {
      cout << n - fullRows << " " << 2 + remainder - 1 << endl;
    } else {
      cout << n - fullRows + 1 << " " << 2 << endl;
    }
  }
  return 0;
}
