#include <bits/stdc++.h>
using namespace std;
const int N = 10005;
const int M = 4100005;
const int X = 999983;
const int INF = 1e9;
const double eps = 1e-8;
const int mod = 1e9 + 7;
long long n, m;
long long k;
int main() {
  while (~scanf("%lld%lld%lld", &n, &m, &k)) {
    k++;
    if (k <= n) {
      printf("%lld 1\n", k);
    } else if (k <= n + m - 1) {
      printf("%lld %lld\n", n, k - n + 1);
    } else {
      k -= n + m - 1;
      long long a = k % (m - 1), b = k / (m - 1);
      if (a == 0) {
        if (b & 1) {
          printf("%lld 2\n", n - b);
        } else {
          printf("%lld %lld\n", n - b, m);
        }
      } else {
        if (b & 1) {
          printf("%lld %lld\n", n - b - 1, a + 1);
        } else {
          printf("%lld %lld\n", n - b - 1, m + 1 - a);
        }
      }
    }
  }
  return 0;
}
