#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 9;
const int MAXN = 1e5 + 1;
const int MOD = 1e9 + 7;
void solve();
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}
void solve() {
  long long n, m, k;
  cin >> n >> m >> k;
  k++;
  if (k <= n) {
    cout << k << " 1";
    return;
  }
  k -= n;
  cout << n - (k + m - 2) / (m - 1) + 1 << " "
       << ((k + m - 2) / (m - 1) % 2 == 1 ? (k - 1) % (m - 1) + 1
                                          : m - ((k - 1) % (m - 1) + 1)) +
              1;
}
