import sys
import numpy as np  # noqa
import numba  # noqa
from numba import njit, b1, i4, i8, f8  # noqa

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


@njit((i8, i8, i8[:]), cache=True)
def main(N, D, XY):
    count = 0
    for i in range(N):
        x, y = XY[i*2:i*2 + 2]
        if abs(x) > D or abs(y) > D:
            continue
        if x**2 + y ** 2 <= D**2:
            count += 1
    return count


N, D = map(int, readline().split())
XY = np.array(read().split(), np.int64)

print(main(N, D, XY)) import sys sys import numpy as np numpy import numba numba from numba import njit, b1, i4, i8, f8 read = sys.stdin.buffer.read read sys.stdin.buffer.read sys.stdin.buffer sys.stdin sys stdin buffer read readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline readlines = sys.stdin.buffer.readlines readlines sys.stdin.buffer.readlines sys.stdin.buffer sys.stdin sys stdin buffer readlines def main(N, D, XY):
    count = 0
    for i in range(N):
        x, y = XY[i*2:i*2 + 2]
        if abs(x) > D or abs(y) > D:
            continue
        if x**2 + y ** 2 <= D**2:
            count += 1
    return count main count = 0 count 0 for i in range(N):
        x, y = XY[i*2:i*2 + 2]
        if abs(x) > D or abs(y) > D:
            continue
        if x**2 + y ** 2 <= D**2:
            count += 1
     i range(N) range N x, y = XY[i*2:i*2 + 2] x XY[i*2:i*2 + 2] XY i*2:i*2 + 2 i*2 i 2 i*2 + 2 i*2 i 2 2 y if abs(x) > D or abs(y) > D:
            continue
         abs(x) > D or abs(y) > D abs(x) > D abs(x) abs x D abs(y) > D abs(y) abs y D continue if x**2 + y ** 2 <= D**2:
            count += 1
     x**2 + y ** 2 <= D**2 x**2 + y ** 2 x**2 x 2 y ** 2 y 2 D**2 D 2 count += 1 count 1 return count count N N D D XY XY @njit((i8, i8, i8[:]), cache=True) main (i8, i8, i8[:]), cache=True @njit((i8, i8, i8[:]), cache=True) njit (i8, i8, i8[:]) i8 i8 i8[:] i8 : cache=True cache True main N, D = map(int, readline().split()) N map(int, readline().split()) map int readline().split() ().split () readline split D XY = np.array(read().split(), np.int64) XY np.array(read().split(), np.int64) np.array np array read().split() ().split () read split np.int64 np int64 print(main(N, D, XY)) print main(N, D, XY) main N D XY D = map(int, readline().split()) map(int, readline().split()) D XY = np.array(read().split(), np.int64) np.array(read().split(), np.int64) XY readlines = sys.stdin.buffer.readlines sys.stdin.buffer.readlines readlines read = sys.stdin.buffer.read sys.stdin.buffer.read read N, D = map(int, readline().split()) map(int, readline().split()) N def main(N, D, XY):
    count = 0
    for i in range(N):
        x, y = XY[i*2:i*2 + 2]
        if abs(x) > D or abs(y) > D:
            continue
        if x**2 + y ** 2 <= D**2:
            count += 1
    return count def main(N, D, XY):
    count = 0
    for i in range(N):
        x, y = XY[i*2:i*2 + 2]
        if abs(x) > D or abs(y) > D:
            continue
        if x**2 + y ** 2 <= D**2:
            count += 1
    return count main readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline
import sys
import numpy as np  # noqa
import numba  # noqa
from numba import njit, b1, i4, i8, f8  # noqa

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


@njit((i8, i8, i8[:]), cache=True)
def main(N, D, XY):
    count = 0
    for i in range(N):
        x, y = XY[i*2:i*2 + 2]
        if abs(x) > D or abs(y) > D:
            continue
        if x**2 + y ** 2 <= D**2:
            count += 1
    return count


N, D = map(int, readline().split())
XY = np.array(read().split(), np.int64)

print(main(N, D, XY))
