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