import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub

		Scanner scan = new Scanner(System.in);
		int next = scan.nextInt();
		int cases = 1;
		while(next != 0){
			ArrayList<Integer> xs = new ArrayList<Integer>();
			ArrayList<Integer> ys = new ArrayList<Integer>();
			for(int i = 1; i <= next; i++){
				int x = scan.nextInt();
				int y = scan.nextInt();
				xs.add(x);
				ys.add(y);
			}
			Collections.sort(xs);
			Collections.sort(ys);
			int xm = xs.get((xs.size()-1)/2);
			int ym = ys.get((ys.size()-1)/2);
			long count = 0;
			for(int i = 0; i < next;i++){
				count += Math.abs(xm- xs.get(i)) + Math.abs(ym - ys.get(i));
			}
			System.out.println("Case " + cases +": (" + xm +"," + ym + ")"+ " " + count);
			next = scan.nextInt();
			cases++;
		}
		scan.close();
	}

}