#include <bits/stdc++.h> using namespace std; int n,m,k; int t1,t2; int main() { cin >> n >> m >> k; t1 = (k - 1) / m + 1; if(k % m == 0) t2 = m; else t2 = k % m; cout << t1 + t2 - 1 << " " << n - t1 + t2; return 0; }