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