(~ ̄▽ ̄)~*
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
using namespace std;
struct node
{
double l,r;
//找到以岛为圆心,以d为半径的圆与坐标x轴的左交点l、右交点r
//雷达只有设在l~r之间,岛才在雷达覆盖范围内
}a[1005];
int cmp(node a,node b)
{
return a.l<b.l;
}
int main()
{
int n,d;
double right;
int Cas=0;
while(scanf("%d%d",&n,&d)&&n+d)
{
Cas++;
bool flag=1;
for(int i=0;i<n;i++)
{
int x,y;
scanf("%d%d",&x,&y);
a[i].l=x-sqrt(d*d*1.0-y*y*1.0);
a[i].r=x+sqrt(d*d*1.0-y*y*1.0);
int dis;
if(y<0) dis=-y;
else dis=y;
if(dis>d) flag=0;
}
if(!flag) printf("Case %d: -1
",Cas);
else
{
int ans=1;
sort(a,a+n,cmp);
right=a[0].r;
for(int i=1;i<n;i++)
{
if(a[i].l>right)
{
ans++;
right=a[i].r;
}
if(a[i].r<right)
right=a[i].r;
}
printf("Case %d: %d
",Cas,ans);
}
}
return 0;
}