import qualified Data.ByteString.Char8 as BS
import Control.Monad
import Data.Char
import Data.List


-- space delimited integers
getVals::IO [Int]
getVals = unfoldr (BS.readInt . BS.dropWhile isSpace) <$> BS.getLine

-- space delimited strings
getStrings::IO [String]
getStrings = (map BS.unpack . BS.words) <$> BS.getLine

distsolve::Int -> (Int,Int) ->Bool
distsolve lim (x,y) = (x^2 + y^2) <=  lim^2

main::IO()
main =do
    n:d:_<- getVals
    dat <-forM [1..n] (\_ -> do
        x:y:_<- getVals
        return (x,y))
    print $ length $ filter (distsolve d) dat
