#include <bits/stdc++.h>
using namespace std;
int main(){
	int n,m,k;
	cin>>n>>m>>k;
	cout<<(k-1)%m+k/m+1<<' '<<n-k/m-1+k%m<<endl;
	return 0;
}