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