import Control.Monad
import Data.List

toInt :: String -> Int
toInt = read :: String -> Int

main = do
  [n, d] <- map toInt . words <$> getLine
  l <- replicateM n $ map toInt . words <$> getLine
  print $ length $ filter (\[x, y] -> x*x+y*y <= d*d) l
