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

parseInt :: C.ByteString -> Int
parseInt = fst . fromJust . C.readInt

readInts :: IO [Int]
readInts = map parseInt . C.words <$> C.getLine

main :: IO ()
main = do
  [n, d] <- readInts
  ans <- length . filter (\[x, y] -> x * x + y * y <= d * d) <$> replicateM n readInts
  printf "%d\n" ans
