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