import io.StdIn.{readInt, readLine}
object Main extends App {
  val Array(n, d) = readLine.split(" ").map(_.toInt)
  val xys = for (_ <- 1 to n) yield readLine.split(" ").map(_.toLong)

  val ranges = xys.map(xy => math.sqrt(xy.head*xy.head + xy.last*xy.last))
  val result = ranges.count(_ <= d)
  println(result)
}