#include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <functional>
#include <iostream>
#include <math.h>



using namespace std;
typedef long long ll;

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int n;
	int c = 1;
	cin >> n;
	while (n != 0)
	{
		int *x = new int[n];
		int *y = new int[n];
		for (int i = 0; i < n; i++)
		{
			cin >> x[i];
			cin >> y[i];
		}

		sort(x, x+n);
		sort(y, y+n);
		
		int xmed,ymed;
		ll d = 0;
		
		xmed = x[(n - 1) / 2];
		ymed = y[(n - 1) / 2];
		for (int i = 0; i < n; i++)
		{
			d += abs(xmed - x[i]);
			d += abs(ymed - y[i]);
		}
		cout << "Case " << c << ": (" << xmed << "," << ymed << ") " << d << endl;
		cin >> n;
		c++;
	
	}


	
	return 0;
}