#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>

using namespace std;
typedef long long ll;

int main() {
	int n; cin >> n;
	int tc = 1;
	do {
		int x[n], y[n];
		for(int i = 0; i < n; i++) {
			cin >> x[i] >> y[i];
		}
		sort(x, x+n);
		sort(y, y+n);
		int xloc = x[(n+1)/2-1];
		int yloc = y[(n+1)/2-1];
		int dist = 0;
		for(int i = 0; i < n; i++) {
			dist += abs(x[i] - xloc);
			dist += abs(y[i] - yloc);
		}
		cout << "Case " << tc << ": (" << xloc << ',' << yloc << ") " << dist << endl;
		cin >> n;
		tc++;
	} while(n != 0);

	return 0;
}