#include<iostream>
#include<sstream>
#include<stdio.h>
#include<vector>
#include<algorithm>
using namespace std;
struct number
{
double x1, x2;//x1表示区间的起点,x2表示区间的终点
bool operator < (const number b) {
return x2 < b.x2||(x2==b.x2&&x1>=b.x1);
}
};
vector<number> v;
void s() {
int num = 1;
int last = v[0].x2;
for (int i = 1; i < v.size(); i++) {
if (v[i].x1 > last)
{
last = v[i].x2;
num++;
}
}
cout << num;
}
int main() {
int n;
double D;
cin >> n >> D;
int t = n;
while (n--) {
number m;
int a,b;
cin >> a >> b;
double t = sqrt(D*D - b*b);
m.x1 = a - t;
m.x2 = a + t;
v.push_back(m);
}
sort(v.begin(), v.end());
s();
system("pause");
}