#include <iostream>
#include <algorithm>

using namespace std;

int main() {
  int n;
  int c = 0;
  while(cin >> n) {
    if(!n)
      return 0;
    c++;
    int x[n], y[n];
    int tx, ty;
    for(int i = 0; i < n; i++) {
      cin >> tx >> ty;
      x[i] = tx;
      y[i] = ty;
    }

    sort(x, x+n); 
    sort(y, y+n);
 
    // dont need to avg 2 middle elements (i think?)
    int xm = x[(n-1)/2];
    int ym = y[(n-1)/2];
  
    int dist = 0; 
    for(int i = 0; i < n; i++) 
      dist += abs(x[i] - xm) + abs(y[i] - ym);

    cout << "Case " << c << ": (" << xm << "," << ym << ") " << dist << endl;
  } 
}