#include <bits/stdc++.h> using namespace std; int N, M, K; int main(){ cin>>N>>M>>K; int x, y; for(int i = 1;i <= M;i++){ if((K - i) % M == 0){ x = (K - i) / M + 1; y = i; break; } } int tt = K % M; int nx = x; int ny = 1 + (N - (x - 1) - 1); for(int i = 1;i < y;i++){ nx++; ny++; } cout<<nx<<" "<<ny<<endl; return 0; }