#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 n;
	int T = 1;
	while(cin >> n && n) {
		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 midx = x[(n-1)/2];
		int midy = y[(n-1)/2];
		ll ans = 0;
		for (int i=0; i<n; i++) {
			ans += abs(x[i] - midx);
			ans += abs(y[i] - midy);
		}
		cout << "Case " << T << ": (" << midx << "," << midy << ")" << " "<< ans << endl;
		T++;
	}
	return 0;
}