#include<bits/stdc++.h>
#define cst const
#define csti const int
#define pii pair<int,int>
#define rep(i,l,r) for(int (i)=(l);(i)<=(r);++(i))
#define per(i,l,r) for(int (i)=(l);(i)>=(r);--(i))
#define eb emplace_back
#define fi first
#define se second
#define il inline
//#define int long long
//#define LOL
#ifdef LOL
csti inf=0x3f3f3f3f3f3f3f3f;
#else
csti inf=0x3f3f3f3f;
#endif
csti N=1e6+7,mod=1;
il int max(csti x,csti y){
	return x>y?x:y;
}
il int min(csti x,csti y){
	return x<y?x:y;
}
il int abs_(csti x){
	return x<0?-x:x;
}
using namespace std;


signed main(){
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	//freopen(".in","r",stdin),freopen(".out","w",stdout);
	int n,m,k;cin>>n>>m>>k;
	int ans1=0,ans2=0;
	int p=k;
	while(p%m!=1){
		p-=(m+1);
	}ans1=p/m;
	p=k;
	while(p%m==0){
		p-=(m-1);
	}while(p>m)p-=m,ans2++;
	ans2+=p;
	cout<<ans2<<' '<<n-ans1;
	return 0;
}