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