program main
  implicit none
  integer*8 N,D
  integer*8,allocatable::P(:,:)
  integer i,ans
  
  read(*,*)N,D
  allocate(P(2,N))
  read(*,*)P
  
  ans = 0
  do i=1,N
    if(P(1,i)*P(1,i)+P(2,i)*P(2,i) <= D*D) then
      ans = ans+1
    end if
  end do
  
  write(*,*) ans
end program main