#include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0),cout.tie(0); int n,m,k; cin >> n >> m >> k; int i = 0,j = n - 1; for (int l = 1 ; l <= k ; l++) { i++; j++; if (l == k) { cout << i << ' ' << j << '\n'; return 0; } if (l % m == 0) { i = i - (m - 1); j -= (m + 1); } } return 0; }