#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-6;
int n, d;
struct Seg{
double x1, x2;
bool operator < (const Seg & s) const
{
return x1 - s.x1 < -eps;
}
};
Seg segs[1000];
int main()
{
int t = 0;
while((scanf("%d", &n) != EOF) && (scanf("%d", &d) != EOF)){
if(n == 0) break;
t++;
bool bad = false;
int i, j;
for(i = 0; i < n; i++){
int x, y;
scanf("%d%d", &x, &y);
if(y > d){
bad = true;
continue;
}
segs[i].x1 = x - sqrt(d*d - y*y);
segs[i].x2 = x + sqrt(d*d - y*y);
}
if(bad){
printf("Case ");
printf("%d", t);
printf(": -1\n");
continue;
}
sort(segs, segs + n);
int firstNoCovered = 0;
int total = 1;
for(i = 0; i < n; i++){
for(j = firstNoCovered; j < i; j++){
if(segs[j].x2 < segs[i].x1){
total++;
firstNoCovered = i;
break;
}
}
}
printf("Case ");
printf("%d", t);
printf(": ");
printf("%d\n", total);
}
return 0;
}