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