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

int main()
{
	int n,m;
	cin >> n >> m;
	int k;
	cin >> k;
	int x = 1;
	int a[n][m];
	int yh,yl;
	bool cnt[n * m];
	memset(cnt,false,sizeof(cnt));
	for(int i = 0;i < n;i ++)
	{
		for(int j = 0;j < m;j ++)
		{
			a[i][j] = x;
			if(x == k)
			{
				yh = i;
				yl = j;
			}
			x ++;
		}
	}
	for(int i = 0;i < n;i ++)
	{
		for(int j = 0;j < i;j ++)
		{
			cnt[a[i][j]] = true;
		}
	}
	if(cnt[a[yh][yl]] == false)
	{
		cout << n + m - yl << " ";
	}
	else
	{
		cout << yh + 1 << " "; 
	}
	cout << yl + 2; 
	return 0;
}