program abc174b
  use iso_fortran_env
  implicit none
  integer(int64) :: n, d
  integer(int64),allocatable :: xy(:,:), x(:), y(:)
  read *, n, d
  allocate(xy(2,n))
  read *, xy
  x = xy(1,:)
  y = xy(2,:)
  print *, count(x*x+y*y<=d*d)
end program abc174b
