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