#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1123456;
template <typename T>
T sqr(T x) {
  return x * x;
}
template <typename T>
void vout(T s) {
  cout << s << "\n";
  exit(0);
}
long long bp(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n % 2) res *= a;
    a *= a;
    n >>= 1;
  }
  return res;
}
vector<long long> v[MAXN], va;
string s1, s2, s3;
set<long long> s;
char cc;
long long c, a1, b1, c1, i, j, n, m, k, ans, sc, x;
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m >> k;
  long long a, b;
  if (k + 1 <= n) {
    cout << k + 1 << " " << 1 << "\n";
    return 0;
  }
  k -= n - 1;
  long long l = 1, r = n;
  while (l < r) {
    long long c = (l + r) / 2;
    a = (c - 1) * (m - 1) + 1;
    if (a > k)
      r = c;
    else
      l = c + 1;
  }
  a = (l - 1) * (m - 1) + 1;
  if (a > k) l--;
  cout << n - l + 1 << " ";
  b = k - ((l - 1) * (m - 1) + 1);
  if (l % 2 == 1) {
    cout << 2 + b;
  } else
    cout << m - b;
  cout << "\n";
  return 0;
}
