// Arup Guha
// 7/20/2013
// Solution to 2012 East Central Regional Problem B: Flash Mob

import java.util.*;

public class b {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		int n = stdin.nextInt();
		int loop = 1;

		// Go through each case.
		while (n != 0) {

			int[] x = new int[n];
			int[] y = new int[n];

			// Read and sort each coordinate.
			for (int i=0; i<n; i++) {
				x[i] = stdin.nextInt();
				y[i] = stdin.nextInt();
			}
			Arrays.sort(x);
			Arrays.sort(y);

			// Answer is median in both axes.
			int xVal = x[(n-1)/2];
			int yVal = y[(n-1)/2];

			// Sum up distances and output result.
			int sum = 0;
			for (int i=0; i<n; i++) {
				sum += Math.abs(xVal-x[i]);
				sum += Math.abs(yVal-y[i]);
			}
			System.out.println("Case "+loop+": ("+xVal+","+yVal+") "+sum);

			// Go to next case.
			n = stdin.nextInt();
			loop++;
		}
	}
}