#include <iostream>
#include <string>
#include <iomanip>
#include <cstdio>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#include <stack>
#include <cmath>
#define L(i, a, b) for (int i = a; i <= b; i++)
#define Bk(i, a, b) for (int i = a; i >= b; i--)
using namespace std;

long long Mi(int a, int b)
{
	long long ans = 1;
	L(i, 2, b)
		ans *= b;
	return ans;
}

void Solve()
{
	int n, m, k;
	cin >> n >> m >> k;
	int odr = ceil(1.0 * k / m), odc = ((k % m == 0) ? m : k % m);
	int nwc, nwr;
	nwc = n - (odr - odc);
	nwr = odr + odc - 1;
	cout << nwr << ' ' << nwc << endl;
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	int t = 1;
//	cin >> t;
	while (t--)
		Solve();
}