#include <bits/stdc++.h>
using namespace std;

int case_num;
int main() {
        ios::sync_with_stdio(0);
        cin.tie(0);
        int n;
        while (cin >> n && n) {
                int x, y;
                vector<int> xs;
                vector<int> ys;
                while (n--) {
                        cin >> x >> y;
                        xs.push_back(x);
                        ys.push_back(y);
                }
                sort(xs.begin(), xs.end());
                sort(ys.begin(), ys.end());

                int rx = xs[(xs.size() - 1) / 2];
                int ry = ys[(ys.size() - 1) / 2];
                long long distance = 0;
                for (int i = 0; i < xs.size(); i++) {
                        distance += abs(xs[i] - rx) + abs(ys[i] - ry);
                }
                        
                cout << "Case " << ++case_num << ": "
                        << "(" << rx << ","
                        << ry << ") " << distance << '\n';

        }
        return 0;
}