program answer
  implicit none
  integer :: i, N, d, count
  integer, allocatable :: x(:), y(:)
  read(*,*) N, D
  allocate(x(n))
  allocate(y(n))
  do i = 1, n
     read(*,*) x(i), y(i)
  end do

  count=0

  do i = 1, n
     if(sqrt(dble(x(i)**2+y(i)**2))<=D) then
        count=count+1
     end if
  end do

  write(*,*) count
  stop
 end program answer
  
