#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <cmath>
#include <cstdio>
using namespace std;
//经典贪心题 右点排序右点放雷达 背
//看博友分析
bool cmp(pair<double,double> x, pair<double, double> y)
{
if(x.second==y.second)
{
return x.first<y.first;
}else
{
return x.second<y.second;
}
}
int main()
{
int tag=0;
while(1)
{
tag++;
vector<pair<double, double> > ve;
double n,r;
scanf("%lf%lf",&n,&r);
//cin>>n>>r;
if(n==0 && r==0)
{
break;
}
int flag=0;
for(int i=0;i<n;i++)
{
double a,b;
scanf("%lf%lf",&a,&b);
//cin>>a>>b;
if(b>r|| b<0 || r<0)//抄博友
{
flag=1;
}else
{
ve.push_back(make_pair(a-sqrt(r*r-b*b), a+sqrt(r*r-b*b)));
//cout<<a-sqrt(r*r-b*b)<<" "<<a+sqrt(r*r-b*b)<<endl;
}
}
if(flag==1)
{
cout<<"Case "<<tag<<": "<<-1<<endl;
continue;
}
sort(ve.begin(),ve.end(),cmp);
double lim=ve[0].second;
int jg=1;
//cout<<endl;
for(int i=0;i<ve.size();i++)
{
//cout<<ve[i].first<<" "<<ve[i].second<<endl;
if(ve[i].first>lim)//不相交
{
lim=ve[i].second;
jg++;
}
}
cout<<"Case "<<tag<<": "<<jg<<endl;
}
return 0;
}