program main
implicit none

integer*8 n,d,i,j
integer, allocatable :: x,y


read*,n,d
! allocate(x(n),y(n))
j=0
do i=1,n
  read*, x,y 
  ! write(*,*) x,y
  if(dsqrt(dble(x**2+y**2)).lt.d)then
    j = j+1
  endif
enddo
write(*,*) j
end program
