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