#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, m, k;
  cin >> n >> m >> k;
  if (k <= n - 1) {
    cout << k + 1 << " 1";
    return 0;
  }
  k -= (n - 1);
  if (m == 2) {
    cout << n - k + 1 << " 2";
    return 0;
  }
  m--;
  k--;
  long long b = k / m;
  long long r = k % m;
  if (b % 2 == 0) {
    cout << n - b << " " << r + 2;
  } else {
    cout << n - b << " " << m + 1 - r;
  }
}
