#include <iostream>
#include <algorithm>

using namespace std;
typedef long long ll;

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int n; cin >> n;
    int csnum = 1;
    while (n > 0) {
        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 xx = x[(n-1)/2], yy = y[(n-1)/2];
        ll ans = 0;
        for (int i = 0; i < n; i++) {
            ans += abs(x[i] - xx);
            ans += abs(y[i] - yy);
        }
        cout << "Case " << csnum << ": (" << xx << "," << yy << ") " << ans << endl;
        cin >> n;
        csnum++;
    }
}