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