#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef vector<int> vi;

#define endl '\n'

int main(){
	ios::sync_with_stdio(0);
	int caseNo = 1;
	while (true) {
		int n; cin >> n;
		if (n == 0) break;
		vector<int> coordsx, coordsy;
		for (int i = 0; i < n; i++) {
			int a, b; cin >> a >> b;
			coordsx.push_back(a);
			coordsy.push_back(b);
		}
		sort(coordsx.begin(), coordsx.end());
		sort(coordsy.begin(), coordsy.end());
		int bestx, besty;
		bestx = coordsx[(n - 1) / 2];
		besty = coordsy[(n - 1) / 2];
		int travel = 0;
		for (int i = 0; i < n / 2; i++) {
			travel += abs(coordsx[i] - coordsx[n-1-i]);
			travel += abs(coordsy[i] - coordsy[n-1-i]);
		}
		cout << "Case " << caseNo << ": (" << bestx << "," << besty << ") " << travel << endl;
		caseNo++;
	}
	return 0;
}