#!/usr/bin/env python3
import sys


def solve(N: int, D: int, X: "List[int]", Y: "List[int]"):
    d2 = D**2
    c = 0
    for i in range(N):
        x = X[i]
        y = Y[i]
        if x**2+y**2 <= d2:
            c+=1
    print(c)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    D = int(next(tokens))  # type: int
    X = [int()] * (N)  # type: "List[int]"
    Y = [int()] * (N)  # type: "List[int]"
    for i in range(N):
        X[i] = int(next(tokens))
        Y[i] = int(next(tokens))
    solve(N, D, X, Y)

if __name__ == '__main__':
    main() import sys sys def solve(N: int, D: int, X: "List[int]", Y: "List[int]"):
    d2 = D**2
    c = 0
    for i in range(N):
        x = X[i]
        y = Y[i]
        if x**2+y**2 <= d2:
            c+=1
    print(c)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template) solve d2 = D**2 d2 D**2 D 2 c = 0 c 0 for i in range(N):
        x = X[i]
        y = Y[i]
        if x**2+y**2 <= d2:
            c+=1
     i range(N) range N x = X[i] x X[i] X i y = Y[i] y Y[i] Y i if x**2+y**2 <= d2:
            c+=1
     x**2+y**2 <= d2 x**2+y**2 x**2 x 2 y**2 y 2 d2 c+=1 c 1 print(c) print c return N: int N D: int D X: "List[int]" X Y: "List[int]" Y def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    D = int(next(tokens))  # type: int
    X = [int()] * (N)  # type: "List[int]"
    Y = [int()] * (N)  # type: "List[int]"
    for i in range(N):
        X[i] = int(next(tokens))
        Y[i] = int(next(tokens))
    solve(N, D, X, Y) main def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
     iterate_tokens for line in sys.stdin:
            for word in line.split():
                yield word
     line sys.stdin sys stdin for word in line.split():
                yield word
     word line.split() line.split line split yield word word tokens = iterate_tokens() tokens iterate_tokens() iterate_tokens N = int(next(tokens)) N int(next(tokens)) int next(tokens) next tokens D = int(next(tokens)) D int(next(tokens)) int next(tokens) next tokens X = [int()] * (N) X [int()] * (N) [int()] int() int N Y = [int()] * (N) Y [int()] * (N) [int()] int() int N for i in range(N):
        X[i] = int(next(tokens))
        Y[i] = int(next(tokens))
     i range(N) range N X[i] = int(next(tokens)) X[i] X i int(next(tokens)) int next(tokens) next tokens Y[i] = int(next(tokens)) Y[i] Y i int(next(tokens)) int next(tokens) next tokens solve(N, D, X, Y) solve N D X Y if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def solve(N: int, D: int, X: "List[int]", Y: "List[int]"):
    d2 = D**2
    c = 0
    for i in range(N):
        x = X[i]
        y = Y[i]
        if x**2+y**2 <= d2:
            c+=1
    print(c)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template) def solve(N: int, D: int, X: "List[int]", Y: "List[int]"):
    d2 = D**2
    c = 0
    for i in range(N):
        x = X[i]
        y = Y[i]
        if x**2+y**2 <= d2:
            c+=1
    print(c)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template) solve def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    D = int(next(tokens))  # type: int
    X = [int()] * (N)  # type: "List[int]"
    Y = [int()] * (N)  # type: "List[int]"
    for i in range(N):
        X[i] = int(next(tokens))
        Y[i] = int(next(tokens))
    solve(N, D, X, Y) def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    D = int(next(tokens))  # type: int
    X = [int()] * (N)  # type: "List[int]"
    Y = [int()] * (N)  # type: "List[int]"
    for i in range(N):
        X[i] = int(next(tokens))
        Y[i] = int(next(tokens))
    solve(N, D, X, Y) main
#!/usr/bin/env python3
import sys


def solve(N: int, D: int, X: "List[int]", Y: "List[int]"):
    d2 = D**2
    c = 0
    for i in range(N):
        x = X[i]
        y = Y[i]
        if x**2+y**2 <= d2:
            c+=1
    print(c)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    D = int(next(tokens))  # type: int
    X = [int()] * (N)  # type: "List[int]"
    Y = [int()] * (N)  # type: "List[int]"
    for i in range(N):
        X[i] = int(next(tokens))
        Y[i] = int(next(tokens))
    solve(N, D, X, Y)

if __name__ == '__main__':
    main()
