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