#include <bits/stdc++.h>
using namespace std;
#define int long long

int n, m, k, p;
int x, y;

signed main()
{
	ios::sync_with_stdio(false);
	cin.tie(0), cout.tie(0);
	cin >> n >> m >> k;
	x = k / m;
	if (k % m != 0)
	{
		x++;
	}
	y = k % m;
	if (k % m == 0)
	{
		y = m;
	}
	int ai = (n - x) + y;
	int aj = x + y - 1;	
	cout << aj << " " << ai << "\n";
	return 0;
}