#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <string>
#include <cmath>
#include <algorithm>
#define Bug cout << "here\n";
using namespace std;
const int N = 1005;
struct node {
double s, f;
}t[N];
bool cmp(const node a, const node b) {
return a.f < b.f;
}
int n, d;
int main() {
int i, x, y, ca = 0;
while(~scanf("%d%d", &n, &d), n|d) {
int flag = 0;
for(i = 0; i < n; i++) {
scanf("%d%d", &x, &y);
if(y > d || d < 0) {
flag = 1;
}
if(flag) continue;
double ks = sqrt((double)d*d - y*y);
t[i].s = x - ks;
t[i].f = x + ks;
}
if(flag) {
printf("Case %d: -1\n", ++ca);
continue;
}
sort(t, t+n, cmp);
int tmp = 0;
int count = 1;
for(i = 1; i < n; i++) {
if(t[i].s > t[tmp].f) {
count++;
tmp = i;
}
}
printf("Case %d: %d\n", ++ca, count);
}
return 0;
}