object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val N = sc.nextInt()
  val D = sc.nextLong()
  println(List.fill(N)(sc.nextLong() -> sc.nextLong()).count {
    case (x, y) => x * x + y * y <= D * D
  })
}
