
Imports System.Console
Module Module1
    Dim ans As Integer
    Sub Main()
        Dim s() As String = ReadLine().Split
        Dim n As Int64 = s(0)
        Dim d As Int64 = s(1)
        d ^= 2
        Dim x As Int64
        Dim y As Int64
        For i = 1 To n
            s = ReadLine().Split
            x = s(0)
            y = s(1)
            If (x ^ 2 + y ^ 2) <= d Then
                ans += 1
            End If
        Next
        WriteLine(ans)
    End Sub
End Module
