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