import Control.Monad
import Control.Applicative
import Data.List

toTuple :: [Int] -> (Int, Int)
toTuple [x,l] = (x+l, x-l)

solve :: [(Int,Int)] -> Int -> Int
solve [] _ = 0
solve ((l,s):xs) cur 
  | cur <= s = 1 + solve xs l
  | otherwise = solve xs cur 

main = do
  n <- readLn :: IO Int
  arms <- replicateM n (toTuple . map read . words <$> getLine) :: IO [(Int, Int)]
  print $ sort arms
  print $ solve (sort arms) (negate $ 10^10)