#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 2e9;
long long i, j, k;
long long n, m, q, ans = 0;
long long lo, hi, mi;
const long long N = 1e6 + 1;
long long a[N], b[N];
long long x, y, z;
void solve() {
  cin >> n >> m >> k;
  if (k < n)
    cout << k + 1 << " 1\n";
  else {
    k -= n;
    long long fil = n - k / (m - 1);
    long long col;
    if (k / (m - 1) % 2 == 0)
      col = 2 + k % (m - 1);
    else
      col = m - k % (m - 1);
    cout << fil << " " << col << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
