import sys
input = sys.stdin.readline


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


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


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


if __name__ == '__main__':
    main()