def resolve():

    N, D = list(map(int, input().split()))

    P = [list(map(int, input().split())) for x in range(N)]



    cnt = 0

    for p in P:

        d = (p[0] ** 2 + p[1] ** 2) ** 0.5

        if d <= D:

            cnt += 1



    print(cnt)

resolve()
def resolve():

    N, D = list(map(int, input().split()))



    cnt = 0

    for n in range(N):

        x, y = list(map(int, input().split()))

        d = (x ** 2 + y ** 2) ** 0.5

        if d <= D:

            cnt += 1



    print(cnt)

resolve()
def resolve():
    N, D = list(map(int, input().split()))
    P = [list(map(int, input().split())) for x in range(N)]
    cnt = 0
    for p in P:
        d = (p[0] ** 2 + p[1] ** 2) ** 0.5
        if d <= D:
            cnt += 1
    print(cnt)


resolve()

def resolve():
    N, D = list(map(int, input().split()))
    cnt = 0
    for n in range(N):
        x, y = list(map(int, input().split()))
        d = (x**2 + y**2) ** 0.5
        if d <= D:
            cnt += 1
    print(cnt)


resolve()

-    P = [list(map(int, input().split())) for x in range(N)] -    for p in P: -        d = (p[0] ** 2 + p[1] ** 2) ** 0.5 +    for n in range(N): +        x, y = list(map(int, input().split())) +        d = (x**2 + y**2) ** 0.5