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

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