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

main = do
  li <- BS.getLine
  let [n,d] = unfoldr (BS.readInt . BS.dropWhile isSpace) li
  co <- BS.getContents
  let xys = map (unfoldr (BS.readInt . BS.dropWhile isSpace)) $ BS.lines co
  let ans = compute n d xys
  print ans

compute :: Int -> Int -> [[Int]] -> Int
compute n d xys = length [() | [x,y] <- xys, x*x+y*y <= d*d]
