#include <bits/stdc++.h>
using namespace std;
const int mx = 1e6 + 1;
long long gcd(long long a, long long b) {
  if (b % a)
    return gcd(b % a, a);
  else
    return a;
}
bool prime(long long x) {
  long long z = sqrt(x);
  for (int i = 2; i <= z; i++)
    if (x % i == 0) return 0;
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long m, p, q, c, i, x, j, t, k, sum = 0, cnt = 0, ans, res;
  long long n;
  cin >> n >> m >> k;
  p = 1, q = 1;
  if (k >= n - 1) {
    p = n;
    q = 1;
    k -= (n - 1);
  } else {
    p = k + 1;
    q = 1;
    k = 0;
    cout << p << " " << q << "\n";
    return 0;
  }
  if (k >= m - 1) {
    p = n;
    q = m;
    k -= (m - 1);
  } else {
    q = k + 1;
    k = 0;
    cout << p << " " << q << "\n";
    return 0;
  }
  if (k > 0) {
    k--;
    p--;
  }
  c = k / (m - 1);
  if (c % 2 == 1) {
    q = 2;
    p -= c;
    q += k % (m - 1);
  } else {
    p -= c;
    q = m;
    q -= k % (m - 1);
  }
  cout << p << " " << q << "\n";
  return 0;
}
