#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

int main() {

	int N;
	for (int i=1; ; i++) {
		cin >> N;
		if (N == 0) break;
		int x, y;
		vector<int> xs(N);
		vector<int> ys(N);
		for (int i=0; i<N; i++) {
			cin >> xs[i] >> ys[i];
		}
		sort(xs.begin(), xs.end());
		sort(ys.begin(), ys.end());

		int medx, medy;
		if (N%2== 1) { //[0...N-1]
			medx = xs[N/2];
			medy = ys[N/2];
		} else {
			//either xs[N/2] or xs[N/2-1], and ys[N/2] or ys[N/2-1]
			medx = xs[(N/2)-1];
			medy = ys[(N/2)-1];
			/*if (xs[(N/2)-1]<xs[N/2]) {
				medx = 
			} else {
				
			}*/
		}
		int totaldist = 0;
		for (int x : xs)
			totaldist+= abs(x-medx);
		for (int y : ys)
			totaldist+= abs(y-medy);

		cout << "Case " << i << ": ("<< medx<< ","<< medy << ") " << totaldist << endl;

	}
}