      PROGRAM piyo
      IMPLICIT NONE
      INTEGER,PARAMETER :: p = 16
      integer(p) :: n,d,x,y,i, ans=0
      
      read*,n,d
      do i = 1,n
        read*,x,y
        if( x**2+y**2<=d**2 )then
          ans = ans + 1
        end if
      end do
      
      print*,ans
      
      
      stop
      !debugg
      
      
      
      END PROGRAM