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

const int N = 100;
int n, m, k, x, y;

int main(){
	cin >> n >> m >> k;
	if(k % m != 0) x = k / m + 1;
	else x = k / m;
	y = k % m;
	if(y == 0) y = m;
	cout << (x + y - 1) << " " << (n - x + y) << "\n";
	return 0;
}