#include <bits/stdc++.h> using namespace std; int n, m, k; int main(){ ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> n >> m >> k; int x = k / m + (k % m != 0); int y = k % m + (k % m == 0) * m; //cout << x << " "<< y; int nx, ny; nx = x; ny = n - x + 1; //cout << nx << " " << ny; nx += y - 1; ny += y - 1; cout << nx << " " << ny; return 0; }