#include <iostream>
#include <math.h>
using namespace std;

const int MAXVERT = 20;

struct point {
	double x, y;
} locations[MAXVERT];
int curMin;
bool adj[MAXVERT][MAXVERT];
int freq[MAXVERT];
int numV;

bool ok(int v, int f)
{
	for(int i=0; i<numV; i++) {
		if (adj[v][i] && freq[i] == f)
			return false;
	}
	return true;
}

void solve(int v, int curMax)
{
	if (v == numV) {
		curMin = curMax;
	}
	else if (curMax < curMin) {
		int f = 1;
		for(; f<=curMax; f++) {
			if (ok(v, f)) {
				freq[v] = f;
				solve(v+1, curMax);
				freq[v] = 0;
			}
		}
		if (curMax < curMin) {
			for(; f<=curMin; f++) {
				if (ok(v, f)) {
					freq[v] = f;
					solve(v+1, f);
					freq[v] = 0;
				}
			}
		}
	}
}

double dist(int i, int j)
{
	double x = locations[i].x - locations[j].x;
	double y = locations[i].y - locations[j].y;
	return sqrt(x*x + y*y);
}

int main()
{
  int Case=1;
	cin >> numV;
	while (numV != 0) {
		for(int i=0; i<numV; i++) {
			for(int j=0; j<numV; j++) {
				adj[i][j] = false;
			}
			freq[i] = 0;
		}
		for(int i=0; i<numV; i++) {
			cin >> locations[i].x >> locations[i].y;
			for(int j=0; j<i; j++) {
				if (dist(i,j) <= 20) {
					adj[i][j] = adj[j][i] = true;
				}
			}
		}
		curMin = numV;
		freq[0] = 1;
		solve(1, 1);
		cout << "The towers in case "<<Case++<<" can be covered in " << curMin << " frequencies." << endl;

		cin >> numV;
	}
 return 0;
}

