import java.awt.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class B_FlashMob {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int case_num = 1;
		while (true) {
			int members = sc.nextInt();
			if (members == 0) {
				return;
			}
			ArrayList<Integer> x_values = new ArrayList<Integer>();
			ArrayList<Integer> y_values = new ArrayList<Integer>();

			for (int i = 0; i < members; i++) {
				x_values.add(sc.nextInt());
				y_values.add(sc.nextInt());
			}

			Collections.sort(x_values);
			Collections.sort(y_values);

			int best_x = x_values.get((members - 1) / 2);
			int best_y = y_values.get((members - 1) / 2);

			int total_dx = 0;
			int total_dy = 0;
			for (Integer x : x_values) {
				total_dx += Math.abs(x - best_x);
			}

			for (Integer y : y_values) {
				total_dy += Math.abs(y - best_y);
			}

			System.out.println("Case " + (case_num++) + ": (" + best_x + "," + best_y + ") " + (total_dx + total_dy));
		}
	}

}