//dpoeschl import java.util.*; public class FlashMob { public static List x; public static List y; public static void main(String[] args) { Scanner scan = new Scanner(System.in); int caseNum = 1; while(true) { int n = scan.nextInt(); if(n == 0) return; x = new ArrayList(); y = new ArrayList(); for(int i = 0; i < n; i++) { x.add(scan.nextInt()); y.add(scan.nextInt()); } Collections.sort(x); Collections.sort(y); int xCoord = x.get((n-1)/2); int yCoord = y.get((n-1)/2); int steps = 0; for(int i = 0; i< n; i++) steps += Math.abs(xCoord - x.get(i)) + Math.abs(yCoord - y.get(i)); System.out.println("Case " + (caseNum++) + ": (" + xCoord + "," + yCoord + ") " + steps); } } }