distance [x,y] = x^2+y^2
main = do
  [_,d] <- map read . words <$> getLine
  xy <- map (map (read::String->Int)) . map words . lines <$> getContents
  print $ (length . filter (<=(d^2)) . map distance) xy