#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,m,x;
	cin>>n>>m>>x;
	int n1=x/m+1,m1=x%m;
	cout<<n1+m1-1<<" "<<m1-n1+n;
	return 0;
}