#include <bits/stdc++.h>
using namespace std;
int main() {
  signed long long int n, m, k, x = 1, y = 1, ax, ay;
  cin >> n >> m >> k;
  if (k >= n * m)
    cout << "1 2\n";
  else {
    if (k + 1 <= n) {
      x = k + 1;
      cout << x << " " << y << endl;
    } else {
      k -= (n - 1);
      x = n - ((k - 1) / (m - 1));
      if (x % 2)
        y = m - (k % (m - 1) == 0 ? m - 2 : (k % (m - 1) - 1));
      else
        y += (k % (m - 1) == 0 ? m - 1 : k % (m - 1));
      cout << x << " " << y << endl;
    }
  }
  return 0;
}
