import java.util.Arrays;
import java.util.Scanner;

public class B {
	private static int[] xset;
	private static int[] yset;
	private static int n;

	public static void main(String[] args) {
		Scanner c = new Scanner(System.in);

		int t = 1;
		while (1 == 1) {
			n = c.nextInt();
			if (n == 0)
				return;
			xset = new int[n];
			yset = new int[n];
			for (int i = 0; i < n; i++) {
				xset[i] = c.nextInt();
				yset[i] = c.nextInt();
			}
			Arrays.sort(xset);
			Arrays.sort(yset);
			if (n % 2 == 1)
				System.out.println("Case " + t + ": " + "(" + xset[n / 2] + "," + yset[n / 2] + ") "
						+ sum(xset[n / 2], yset[n / 2]));
			if (n % 2 == 0)
				System.out.println("Case " + t + ": " + "(" + xset[n / 2 - 1] + "," + yset[n / 2 - 1] + ") "
						+ sum(xset[n / 2 - 1], yset[n / 2 - 1]));
			t++;
		}
	}

	private static int sum(int i, int j) {
		int sum = 0;
		for (int i1 = 0; i1 < n; i1++) {
			sum += Math.abs(xset[i1] - i);
			sum += Math.abs(yset[i1] - j);
		}
		return sum;
	}

}