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