import Control.Monad
import Data.List
import qualified Data.ByteString.Char8 as BS
import Data.Maybe
import Data.Array

main = do
    [n,d] <- map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine
    xys <- replicateM n (format.map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine) :: IO [(Int,Int)]
    print $ answer d xys

format (x:y:_) = (x,y)

answer d = length . filter (<= fromIntegral d^2) . map dist

dist :: (Int,Int) -> Integer
dist (x,y) = fromIntegral x^2 + fromIntegral y^2