// ACMSept17B.cpp : Defines the entry point for the console application.
//

//UBC Competative pOrgramming 
//Sept 17th 2016
//ECNA 2012

//B: Flash Mob


//#include "stdafx.h"
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;


int main(int argc, char** argv[])
{

	int n;
	int x;
	int y;
	unsigned int dist;
	int med;
	int caseNum = 0;

	cin >> n;
	

	while (n != 0) {
		vector<int> xcoords;
		vector<int> ycoords;

		dist = 0;
		caseNum++;

		if (n % 2 == 0) {
			med = n / 2 - 1;
		}
		else {
			med = n / 2;
		}

		for (int i = 0; i < n; i++) {
			cin >> x >> y;
			xcoords.push_back(x);
			ycoords.push_back(y);

		}

		sort(xcoords.begin(), xcoords.end());
		sort(ycoords.begin(), ycoords.end());
		
		//get total distance
		for (int i = 0; i < n; i++) {
			dist += abs(xcoords[med] - xcoords[i]) + abs(ycoords[med] - ycoords[i]);
		}


		cout << "Case " << caseNum << ": (" << xcoords[med] << "," << ycoords[med] << ") " << dist << "\n";



		cin >> n;
	}




    return 0;
}