#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const long long LINF = (long long)1e18;
long long n, m, k;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ;
  cin >> n >> m >> k;
  if (k < n) {
    cout << k + 1 << " " << 1;
    return 0;
  }
  long long x = (k - n) / (m - 1);
  long long y = (k - n) % (m - 1);
  if (x % 2 == 0)
    cout << n - x << " " << 2 + y;
  else
    cout << n - x << " " << m - y;
  return 0;
}
