program main
    implicit none
    integer::a,c,d,ans,i,b
    ans=0
    read*, a, b
    do  i=0,a-1
        read*, c, d
        if(sqrt(real((c*c)+(d*d))) <real(b) .or. sqrt(real((c*c)+(d*d))) .eq. real(b)) then
            ans=ans+1
        endif
    end do

    write(*,*) ans
end program main