import 'dart:io';
import 'dart:math';

void main() {
  List<int> NnD =
      stdin.readLineSync().split(" ").map((x) => int.parse(x)).toList();
  int N = NnD[0];
  int D = NnD[1];
  List<int> Xs = [];
  List<int> Ys = [];
  int count = 0;
  int count2 = -1;

  for (int i = 0; i < N; i++) {
    List<int> XnY =
        stdin.readLineSync().split(" ").map((x) => int.parse(x)).toList();
    Xs.add(XnY[0]);
    Ys.add(XnY[1]);
    int x = pow(Xs[i], 2);
    int y = pow(Ys[i], 2);
    int ans = (sqrt(x + y).round());
    if (ans <= D) {
      count += 1;
    }
  }
  for (int i = 1; i < N; i++) {
    if (Xs[i - 1] == Xs[i] && Ys[i - 1] == Ys[i]) {
      count2 += 1;
    }
  }
  print(count - count2);
}
