#include <bits/stdc++.h>
using namespace std;
const long long MAX = 1e7 + 10;
const long long N = 4e5 + 10;
int32_t main() {
  long long n, m, k;
  cin >> n >> m >> k;
  if (k < n)
    cout << k + 1 << " 1\n";
  else {
    k -= n;
    m--;
    cout << n - k / m;
    if (k / m & 1)
      cout << ' ' << m - k % m + 1;
    else
      cout << ' ' << k % m + 2;
  }
  return 0;
}
