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