#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 10;
const long long inf = 1e9 + 7;
long long n, m, k;
int main() {
  cin >> n >> m >> k;
  if (k < n) {
    cout << k + 1 << " " << 1 << endl;
    return 0;
  }
  k -= (n - 1);
  if (k == 1) {
    cout << n << " " << 2 << endl;
    return 0;
  }
  k--;
  long long o = m - 1;
  long long t = k % (m - 1);
  cout << n - k / o << " ";
  if ((k / o) % 2 == 1)
    cout << m - k % o << endl;
  else
    cout << k % o + 2 << endl;
}
