program main
    implicit none
    integer::n,d,xx,yy,i,cou
    real(8),allocatable::x(:),y(:)
    real(8)::z

    read*,n,d
    allocate(x(n),y(n))

    do i=1,n
    read*,xx,yy
    x(i)=xx
    y(i)=yy
    !print*,x(i),y(i)
    end do
    !print*,x,y


    cou=0
    do i=1,n
        z=sqrt(x(i)**2+y(i)**2)
        if(z<=d) then
            cou=cou+1
        end if
     end do

     print*,cou



end program main