#include <iostream>
#include <vector>
#include <algorithm>

int main(int argc, char** argv) {
    std::ios_base::sync_with_stdio(0);
    std::cin.tie(0);
    int n, count, x, y, dis;
    count = 1;
    std::cin >> n;
    while(n) {
        std::vector<int> xx, yy;
        dis = 0;
        for(int i = 0; i < n; i++) {
            int x_temp, y_temp;
            std::cin >> x_temp;
            std::cin >> y_temp;
            xx.push_back(x_temp);
            yy.push_back(y_temp);
        }
        sort (xx.begin(), xx.end());
        sort (yy.begin(), yy.end());
        x = xx[(n-1)/2];
        y = yy[(n-1)/2];
        for(int i = 0; i < n; i++) {
            int x_dis, y_dis;
            x_dis = xx[i] - x;
            if(x_dis < 0) x_dis = -x_dis;
            y_dis = yy[i] - y;
            if(y_dis < 0) y_dis = -y_dis;
            dis += x_dis + y_dis;
        }
        std::cout << "Case " << count++ << ": (" << x << "," << y << ") " << dis << std::endl;
        xx.clear();
        yy.clear();
        std::cin >> n;
    }
    return 0;
}