#include <bits/stdc++.h>
#pragma optimize("", off)
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma comment(linker, "/STACK:36777216")
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  srand(time(NULL));
  long long int n, m, k;
  cin >> n >> m >> k;
  if (k <= n - 1) return cout << 1 + k << " " << 1, 0;
  k -= (n - 1);
  if (k <= m - 1) return cout << n << " " << 1 + k, 0;
  k -= (m - 1);
  long long int x = k / (m - 1);
  long long int y = k % (m - 1);
  if (!(x & 1)) {
    if (y == 0)
      cout << n - x << " " << m;
    else
      cout << n - x - 1 << " " << m - y + 1;
  } else {
    if (y == 0)
      cout << n - x << " " << 2;
    else
      cout << n - x - 1 << " " << 2 + y - 1;
  }
}
