#include <iostream>
using namespace std;
int main(){
	int n, m, x;
	cin >> n >> m >> x;
	cout << x / m + x % m << ' ';
	int i = 1;
	while (x < m * (n - 1) + 1){
		x += m;
		i++;
	}
	cout << i + x + m - m * n - 1;
}