import Control.Monad
import Data.Set hiding (map,filter)
main = do
  [n,d] <- map read . words <$> getLine :: IO [Int]
  xys <- replicateM n $ map (read :: String -> Double) . words <$> getLine :: IO [[Double]]
  print . length . filter (d >=) $ [(ceiling . sqrt) (x^2+y^2) | (x:y:[]) <- xys]

  
