import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n, d =map(int,input().split())
    ans = 0
    for i in range(n):
        x, y = map(int,input().split())
        if x**2 + y**2 <= d**2:
            ans += 1
    print(ans)

if __name__=='__main__':
    main() import sys sys def input(): return sys.stdin.readline().rstrip() input def main():
    n, d =map(int,input().split())
    ans = 0
    for i in range(n):
        x, y = map(int,input().split())
        if x**2 + y**2 <= d**2:
            ans += 1
    print(ans) 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 i in range(n):
        x, y = map(int,input().split())
        if x**2 + y**2 <= d**2:
            ans += 1
     i 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**2:
            ans += 1
     x**2 + y**2 <= d**2 x**2 + y**2 x**2 x 2 y**2 y 2 d**2 d 2 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())
    ans = 0
    for i in range(n):
        x, y = map(int,input().split())
        if x**2 + y**2 <= d**2:
            ans += 1
    print(ans) def main():
    n, d =map(int,input().split())
    ans = 0
    for i in range(n):
        x, y = map(int,input().split())
        if x**2 + y**2 <= d**2:
            ans += 1
    print(ans) main def input(): return sys.stdin.readline().rstrip() def input(): return sys.stdin.readline().rstrip() input
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n, d =map(int,input().split())
    ans = 0
    for i in range(n):
        x, y = map(int,input().split())
        if x**2 + y**2 <= d**2:
            ans += 1
    print(ans)

if __name__=='__main__':
    main()