#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, k;
  scanf("%lld %lld %lld", &n, &m, &k);
  k++;
  if (k - n <= 0)
    printf("%lld 1\n", k);
  else {
    k -= n;
    long long int cnt = 1;
    while (1) {
      if ((k - (m - 1)) <= 0) break;
      k = (k - (m - 1));
      cnt++;
    }
    if (cnt & 1)
      printf("%lld %lld\n", (n - cnt + 1), k + 1);
    else
      printf("%lld %lld\n", (n - cnt + 1), (m - k + 1));
  }
  return 0;
}
