program main
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int64):: n,d,x,y,d2,i,ans
    integer(int64), allocatable:: dist(:)

    read*, n,d
    allocate(dist(n))

    do i=1,n
        read*, x,y
        dist(i) = x*x + y*y
    end do

    d2 = d*d
    ans = 0
    do i=1,n
        if (dist(i) <= d2) ans=ans+1
    end do
    print'(i0)', ans
end program main