#include<bits/stdtr1c++.h>
using namespace std;

int T, N, X[1005], Y[1005];

int main () {
  ios::sync_with_stdio(0);
  cin.tie();

  while (true) {
    ++T;
    cin >> N;
    if (!N) break;
    for (int i = 0; i < N; ++i) {
      cin >> X[i] >> Y[i];
    }
    sort(X, X+N);
    sort(Y, Y+N);
    int rx = X[N/2 - !(N%2)];
    int ry = Y[N/2 - !(N%2)];
    long long res = 0;
    for (int i = 0; i < N; ++i) {
      res += abs(X[i] - rx);
      res += abs(Y[i] - ry);
    }
    cout << "Case " << T << ": (" << rx << "," << ry << ") " << res << endl;
  }

  return 0;
}