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