output_description: Print an integer representing the number of points such that the distance from
  the origin is at most D.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N D
      X_1 Y_1
      \vdots
      X_N Y_N
attempt: import os
  import sys
  from io import BytesIO, IOBase
  
  # from collections import defaultdict as dd
  # from collections import deque as dq
  # import itertools as it
  # from math import sqrt, log, log2
  # from fractions import Fraction
  
  
  def main():
      t = 1
      for _ in range(t):
          # n = int(input())
          n, d = map(int, input().split())
          c = 0
          for i in range(n):
              x, y = map(int, input().split())
              if (x**2 + y**2) <= d**2:
                  c += 1
          print(c)
  
          # nums = list(map(int, input().split()))
  
  
  # region fastio
  BUFSIZE = 8192
  
  
  class FastIO(IOBase):
      newlines = 0
  
      def __init__(self, file):
          self._fd = file.fileno()
          self.buffer = BytesIO()
          self.writable = "x" in file.mode or "r" not in file.mode
          self.write = self.buffer.write if self.writable else None
  
      def read(self):
          while True:
              b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
              if not b:
                  break
              ptr = self.buffer.tell()
              self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
          self.newlines = 0
          return self.buffer.read()
  
      def readline(self):
          while self.newlines == 0:
              b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
              self.newlines = b.count(b"\n") + (not b)
              ptr = self.buffer.tell()
              self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
          self.newlines -= 1
          return self.buffer.readline()
  
      def flush(self):
          if self.writable:
              os.write(self._fd, self.buffer.getvalue())
              self.buffer.truncate(0), self.buffer.seek(0)
  
  
  class IOWrapper(IOBase):
      def __init__(self, file):
          self.buffer = FastIO(file)
          self.flush = self.buffer.flush
          self.writable = self.buffer.writable
          self.write = lambda s: self.buffer.write(s.encode("ascii"))
          self.read = lambda: self.buffer.read().decode("ascii")
          self.readline = lambda: self.buffer.readline().decode("ascii")
  
  
  sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
  input = lambda: sys.stdin.readline().rstrip("\r\n")
  # endregion
  
  if __name__ == "__main__":
      main()
  
problem_description: Statement
  
  We have N points in the two-dimensional plane. The coordinates of the i-th
  point are (X_i,Y_i).
  
  Among them, we are looking for the points such that the distance from the
  origin is at most D. How many such points are there?
  
  We remind you that the distance between the origin and the point (p, q) can be
  represented as \sqrt{p^2+q^2}.
samples: [{"input": "4 5\n    0 5\n    -2 4\n    3 4\n    4 -4", "output": "3\n    \n\nThe distance between the origin and each of the given points is as follows:\n\n  * \\sqrt{0^2+5^2}=5\n  * \\sqrt{(-2)^2+4^2}=4.472\\ldots\n  * \\sqrt{3^2+4^2}=5\n  * \\sqrt{4^2+(-4)^2}=5.656\\ldots\n\nThus, we have three points such that the distance from the origin is at most\n5.\n\n* * *"}, {"input": "12 3\n    1 1\n    1 1\n    1 1\n    1 1\n    1 2\n    1 3\n    2 1\n    2 2\n    2 3\n    3 1\n    3 2\n    3 3", "output": "7\n    \n\nMultiple points may exist at the same coordinates.\n\n* * *"}, {"input": "20 100000\n    14309 -32939\n    -56855 100340\n    151364 25430\n    103789 -113141\n    147404 -136977\n    -37006 -30929\n    188810 -49557\n    13419 70401\n    -88280 165170\n    -196399 137941\n    -176527 -61904\n    46659 115261\n    -153551 114185\n    98784 -6820\n    94111 -86268\n    -30401 61477\n    -55056 7872\n    5901 -163796\n    138819 -185986\n    -69848 -96669", "output": "6"}]