#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <stdbool.h>

#define calc_dist(x1, y1, x2, y2)	(abs(x1 - x2) + abs(y1 - y2))

static int xarr[2000], yarr[2000];

int calc_total_dist(int kase, int x, int y) {
	int i = 0, total = 0;
	for(i = 0; i < kase; i += 1) {
		total += calc_dist(x, y, xarr[i], yarr[i]);
	//	printf("+%d ", calc_dist(x, y, xarr[i], yarr[i]));
	}
//	printf("=%d\n", total);
	return total;
}

int comp(const void *a, const void *b) {
	return (*(int *)a) - (*(int *)b);
}

int main(void) {
	int kase = -1, counter = 0;
	int xmid = 0, ymid = 0;
	while(kase != 0) {
		int i = 0;
		scanf("%d", &kase);
		if(kase == 0) break;
		for(i = 0; i < kase; i += 1) {
			scanf("%d %d", &xarr[i], &yarr[i]);
		//	a += xarr[i], b += yarr[i];
		}
		qsort(xarr, kase, sizeof(int), comp);
		qsort(yarr, kase, sizeof(int), comp);
	/*	for(i = 0; i < kase; i += 1) {
			printf("%d %d\n", xarr[i], yarr[i]);
		}
		printf("%d\n", kase / 2);*/
		if(kase % 2 == 0) {
			xmid = xarr[kase / 2 - 1];
			ymid = yarr[kase / 2 - 1];
		} else {
			xmid = xarr[kase / 2];
			ymid = yarr[kase / 2];
		}
		counter += 1;
		printf("Case %d: (%d, %d) %d\n", counter, xmid, ymid, \
			calc_total_dist(kase, xmid, ymid));
	}
	return 0;
}