import Data.Maybe
import Text.Printf
import Control.Monad
import qualified Data.ByteString.Char8 as B

readIntegers = map (fst . fromJust . B.readInteger) . B.words <$> B.getLine

mp [a, b] = (a, b)

main = do
    [n, d] <- readIntegers
    ps <- map mp <$> replicateM (fromIntegral n) readIntegers
    print $ length $ filter (f d) ps

f d (x, y) = x^2 + y^2 <= d^2