program b174

implicit none
integer :: n, d, i, a
integer, allocatable :: x(:), y(:)

a = 0

read *, n, d

allocate(x(1:n))
allocate(y(1:n))

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

if (x(i) ** 2 + y(i) ** 2 <= d ** 2) then
 a = a + 1
end if

end do

print *, a

end program b174