#include <bits/stdc++.h>
using namespace std;
int main() {
  if (fopen("input.txt", "r")) {
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  }
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, m, k;
  cin >> n >> m >> k;
  long long int row, col, quot, rem;
  if (k <= n - 1) {
    row = 1, col = 1;
    while (k--) row++;
  } else {
    k -= n - 1;
    quot = k / (m - 1), rem = k % (m - 1);
    if (rem == 0) {
      quot--;
      rem = m - 1;
    }
    rem--;
    row = n - quot;
    if (row & 1) {
      col = m;
      while (rem--) {
        col--;
      }
    } else {
      col = 2;
      while (rem--) {
        col++;
      }
    }
  }
  cout << row << " " << col << endl;
  return 0;
}
