#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  long long int n, m, i, k, l, r, ar, ac, c;
  cin >> n >> m >> k;
  if (k < n) {
    cout << k + 1 << " " << 1 << "\n";
    return 0;
  }
  r = n - ceil(1.0 * (k - n) / (m - 1)) + 1;
  if ((k - n) % (m - 1) == 0) {
    r--;
  }
  if (r % 2) {
    c = m - ((k - n) % (m - 1));
  } else {
    c = (k - n) % (m - 1) + 2;
  }
  cout << r << " " << c;
}
