program sample
    implicit none
  
    integer(8) :: i,j,m,n,a,b,d
    integer(8),allocatable :: x(:),y(:)
  
    read(*,*) n,d
    m=0
    do i=1,n

        read(*,*) a,b
        if(a**2+b**2<=d**2)then
            m=m+1
        end if
    end do
    write(*,*)m
    stop

end program sample
  

