#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 x = ceil(k * 1.00 / m); int y = k % m; //cout << x << " " << y << endl; cout << x + y - 1 << " " << n - x + y << endl; return 0; }