def main(X, Y, D):
    length = X**2 + Y**2
    if length <= D**2:
        return 1
    else:
        return 0

if __name__ == '__main__':
    N, D = map(int, input().split())
    ans = 0
    for _ in range(N):
        X, Y = map(int, input().split())
        ans += main(X, Y, D)
    print(ans)
 def main(X, Y, D):
    length = X**2 + Y**2
    if length <= D**2:
        return 1
    else:
        return 0 main length = X**2 + Y**2 length X**2 + Y**2 X**2 X 2 Y**2 Y 2 if length <= D**2:
        return 1
    else:
        return 0 length <= D**2 length D**2 D 2 return 1 1 return 0 0 X X Y Y D D if __name__ == '__main__':
    N, D = map(int, input().split())
    ans = 0
    for _ in range(N):
        X, Y = map(int, input().split())
        ans += main(X, Y, D)
    print(ans) __name__ == '__main__' __name__ '__main__' N, D = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split D ans = 0 ans 0 for _ in range(N):
        X, Y = map(int, input().split())
        ans += main(X, Y, D)
     _ range(N) range N X, Y = map(int, input().split()) X map(int, input().split()) map int input().split() ().split () input split Y ans += main(X, Y, D) ans main(X, Y, D) main X Y D print(ans) print ans N, D = map(int, input().split()) map(int, input().split()) N ans = 0 0 ans ans += main(X, Y, D) main(X, Y, D) ans X, Y = map(int, input().split()) map(int, input().split()) X D = map(int, input().split()) map(int, input().split()) D Y = map(int, input().split()) map(int, input().split()) Y def main(X, Y, D):
    length = X**2 + Y**2
    if length <= D**2:
        return 1
    else:
        return 0 def main(X, Y, D):
    length = X**2 + Y**2
    if length <= D**2:
        return 1
    else:
        return 0 main
def main(X, Y, D):
    length = X**2 + Y**2
    if length <= D**2:
        return 1
    else:
        return 0

if __name__ == '__main__':
    N, D = map(int, input().split())
    ans = 0
    for _ in range(N):
        X, Y = map(int, input().split())
        ans += main(X, Y, D)
    print(ans)

