#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k;
  while (~scanf("%lld%lld%lld", &n, &m, &k)) {
    if (k + 1 <= n) {
      printf("%lld %d\n", k + 1, 1);
    } else {
      k = k - (n - 1);
      long long t = (n * (m - 1) - k + 1);
      long long x = t / (m - 1) - (t % (m - 1) == 0 ? 1 : 0);
      long long y;
      if (x % 2 == 0) {
        y = t - (x * (m - 1));
      } else {
        y = ((x + 1) * (m - 1) - t) + 1;
      }
      printf("%lld %lld\n", x + 1, y + 1);
    }
  }
  return 0;
}
