#include <bits/stdc++.h> using namespace std; int n,m,k,a,b,x; int main(){ ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); //Do not need freopen; cin >> n >> m >> k; for (int i = 1;i <= m;i++){ if ((k - i) % m == 0){ x = (k - i) / m; a = i + x; b = i - 1 - x + n; } } cout << a << " " << b << endl; return 0; }