#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); //freopen("p1.in","r",stdin); //freopen("p1.out","w",stdout); int n,m,k,r,c; cin >> n >> m >> k; r = (k - 1) / m + 1; c = ((k - 1) % m) + 1; cout << c + r - 1 << " " << n - r + c << endl; return 0; }