def main():

  from math import sqrt

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

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

  ans = 0

  for i in range(N):

    if sqrt(P[i][0]**2 + P[i][1]**2) <= D:

      ans += 1

  print(ans)

main()
def main():

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

  ans = 0

  for i in range(N):

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

    if x**2 + y**2 <= D**2:

      ans += 1

  print(ans)

main()
def main():
    from math import sqrt

    N, D = list(map(int, input().split()))
    P = [list(map(int, input().split())) for i in range(N)]
    ans = 0
    for i in range(N):
        if sqrt(P[i][0] ** 2 + P[i][1] ** 2) <= D:
            ans += 1
    print(ans)


main()

def main():
    N, D = list(map(int, input().split()))
    ans = 0
    for i in range(N):
        x, y = list(map(int, input().split()))
        if x**2 + y**2 <= D**2:
            ans += 1
    print(ans)


main()

-    from math import sqrt - -    P = [list(map(int, input().split())) for i in range(N)] -        if sqrt(P[i][0] ** 2 + P[i][1] ** 2) <= D: +        x, y = list(map(int, input().split())) +        if x**2 + y**2 <= D**2: