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