#include <iostream>
#include <algorithm>
using namespace std;
int c = 1;

void solve(int x[], int y[], int n) {
	cout << "Case " << c << ": ";
	int x_coord, y_coord;
	sort(x, x+n);
	sort(y, y+n);
	int x_dis = 0, y_dis = 0;
	x_coord = x[(n-1)/2];
	y_coord = y[(n-1)/2];
	for (int i = 0; i < n; i++) {
		x_dis += abs(x[i] - x_coord);	
		y_dis += abs(y[i] - y_coord);
	}
	c++;
	cout << "(" << x_coord << "," << y_coord << ") "<< x_dis + y_dis << "\n";
}

int main() {
	int n;
	while(true) {
		cin >> n;
		if (n == 0) break;
		int x[n];
		int y[n];
		for (int i = 0; i < n; i++) {
			cin >> x[i];
			cin >> y[i];
		}
		solve(x, y, n);
	}
	return 0;
}