#include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(0); cin.tie(0);cout.tie(0); int n,m,k; cin>>n>>m>>k; int h=0,l=n-1,dep=0; for(int i=1;i<=k;i++){ h++; l++; dep++; if(dep>m){ dep=1; h=h-m+1; l=l-m-1; } } cout<<h<<" "<<l<<'\n'; }