#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  if (k < n) {
    cout << (k + 1) << " " << (1) << "\n";
  } else {
    k = k - n;
    long long st = k % (m - 1);
    long long row = k / (m - 1);
    if (row % 2 == 0) {
      cout << (n - row) << " " << (2 + st) << "\n";
    } else {
      cout << (n - row) << " " << (m - st) << "\n";
    }
  }
}
