#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int main() {
  long long n, m;
  long long k;
  while (scanf("%lld%lld%lld", &n, &m, &k) != EOF) {
    if ((k + 1) <= n)
      printf("%lld 1\n", k + 1);
    else {
      long long ans1, ans2;
      long long x = (k + 1 - n) / (m - 1);
      long long temp2 = (k + 1 - n) - x * (m - 1);
      if (x & 1) {
        if (temp2 == 0) {
          ans1 = n - x + 1;
          ans2 = m;
        } else {
          ans1 = n - x;
          ans2 = m - temp2 + 1;
        }
      } else {
        if (temp2 == 0) {
          ans1 = n - x + 1;
          ans2 = 2;
        } else {
          ans1 = n - x;
          ans2 = 1 + temp2;
        }
      }
      printf("%lld %lld\n", ans1, ans2);
    }
  }
  return 0;
}
