#include<iostream>
#include<algorithm>
#define int long long
using namespace std;

int x[10000],y[10000];
int abso(int x) {
	if(x<0) return -x;
	return x;
}
#undef int
int main(void) {
#define int long long
	int n, ca = 1;
	while(cin >> n) {
		if(n==0) break;

		int mx, my, dx,dy;
		for(int i=0; i<n; i++) {
			cin >> x[i] >> y[i];
		}
		sort(x,x+n);
		sort(y,y+n);
		if(n%2==1) {
			mx = x[n/2];
			my = y[n/2];
		} else {
			mx = (x[n/2-1]);
			my = (y[n/2-1]);
		}
		dx = 0, dy = 0;
		for(int i=0; i<n; i++) {
			dx += abso(mx-x[i]);
			dy += abso(my-y[i]);
		}
		cout << "Case " << ca << ": (" << mx << "," << my << ") " << dx+dy << endl;
		ca++;
	}
	return 0;
}