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