#include <bits/stdc++.h>
using namespace std;
long long n, m, k;
void _input() { cin >> n >> m >> k; }
void _solve() {
  long long f, c;
  f = c = 1;
  if (k > 0) {
    f += min(k, n - 1);
    k -= min(k, n - 1);
  }
  if (k > 0) {
    c++;
    k--;
  }
  if (k > 0) {
    long long ps = k / (m - 1), r = k % (m - 1);
    f -= ps;
    if (ps % 2 == 0)
      c = 2 + r;
    else
      c = m - r;
  }
  cout << f << ' ' << c << endl;
}
bool solve() { return true; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int qq = 1;
  int cc = 1;
  while (cc++ <= qq) {
    _input();
    _solve();
  }
}
