#include <bits/stdtr1c++.h>

using namespace std;

int main() {
#define int long long
  ios_base::sync_with_stdio(0);
  int n, x, y, dist, mx, my, cs = 0;
  cin >> n;
  vector<int> X, Y;
  while (n) {
    X.clear(); Y.clear();
    dist = 0;
    for (int i = 0; i < n; i++) {
      cin >> x >> y;
      X.push_back(x); Y.push_back(y);
    }
    sort(X.begin(), X.end());
    sort(Y.begin(), Y.end());
    if (n % 2 == 0) {
      mx = X[n/2 -1];
      my = Y[n/2 - 1];
    } else {
      mx = X[n/2];
      my = Y[n/2];
    }
    for (const int &p : X) {
      dist += abs(p-mx);
    }
    for (const int &p : Y) {
      dist += abs(p-my);
    }
    cout << "Case " << ++cs << ": (" << mx << "," << my << ") " << dist << endl;
    cin >> n;
  }
}