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