import           Control.Monad

main :: IO ()
main = do
  [n, d] <- map read . words <$> getLine
  points <- map (map read . words) <$> replicateM n getLine :: IO [[Integer]]
  print $ length $ filter id $ map
    (\[x, y] -> x ^ 2 + y ^ 2 <= (fromIntegral d) ^ 2)
    points
