program abc29
 implicit none
 integer(8)::N,D,i,ia,c=0
 integer(8),allocatable::a(:),b(:)
 read(*,*)N,D
 allocate(a(N),b(N))
 do i=1,N
  read(*,*)a(i),b(i)
 end do
 do ia=1,N
  if(a(ia)**2+b(ia)**2<=D**2)then
   c=c+1
  end if
 end do
 print'(i0)',c
 deallocate(a,b)
end program abc29