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

int main()
{
    int t = 0;
    while (1)
    {
        int n; cin >> n;
        if (!n) break;
        
        vector<int> x(n);
        vector<int> y(n);
        for (int i = 0; i < n; i++)
        {
            cin >> x[i] >> y[i];
        }
        
        sort(x.begin(), x.end());
        sort(y.begin(), y.end());
        int xm = x[(n - 1) / 2];
        int ym = y[(n - 1) / 2];
        int s = 0;
        for (int i = 0; i < n; i++)
        {
            s += abs(x[i] - xm);
            s += abs(y[i] - ym);
        }
        cout << "Case " << ++t << ": (" << xm << "," << ym << ") " << s << endl;
    }
}