{-# LANGUAGE TypeApplications #-}

import           Control.Applicative
import           Control.Arrow
import           Control.Monad
import           Data.Bits
import qualified Data.ByteString.Char8         as B
import           Data.Char
import           Data.List
import qualified Data.Vector.Unboxed           as V
import           Data.Maybe

main = do
  [n, d] <- map (read @Int) . words <$> getLine
  pts    <-
    replicateM n $ (\[x, y] -> (x, y)) . map (read @Int) . words <$> getLine
  print
    . length
    . filter (d * d >=)
    . map (uncurry (+) . duplicate (***) (duplicate (*)))
    $ pts
  where duplicate f x = f x x

