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