#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
const int N = 1010;
using namespace std;
#define inf ox3f3f3f3f
struct ss{
double x;
double y;
double s;//该点对应区间的左端点
double e;//该点对应区间的右端点
}p[N];
bool cmp(ss x, ss y){
if(x.e == y.e)
return x.s < y.s;
return x.e<y.e;
}
int flag[N];
int main(){
//freopen("in.txt","r",stdin);
// freopen("out.txt","w",stdout);
int n,t = 0,ans;
double d;
while(scanf("%d%lf",&n,&d) && n+d){
++t;
ans = 0;
// memset(ans,0,sizeof(ans));
memset(flag,0,sizeof(flag));
for(int i = 0; i < n; i ++){
scanf("%lf%lf",&p[i].x,&p[i].y);
double len = sqrt(d*d - p[i].y*p[i].y);
p[i].s = p[i].x - len;
p[i].e = p[i].x + len;
}
sort(p,p+n,cmp);
int kk = 1;
for(int i = 0; i < n; i ++){
if(p[i].y > d){//当前点的纵坐标超出雷达能达到的的最大范围
kk = 0;
break;
}
if(flag[i]) continue;
flag[i] = 1;
for(int j = i+1; j < n; j ++)//找出该区间可以覆盖的所有点
if(p[j].s <= p[i].e){
flag[j] = 1;
}
ans ++;
}
if(kk)
printf("Case %d: %d\n",t,ans);
else
printf("Case %d: -1\n",t);
}
return 0;
}