import Control.Concurrent
import Control.Monad
import qualified Data.ByteString.Char8 as BS

--import qualified Data.Heap as H  -- atcoder judge does not have this.
import Data.List

import qualified Data.Set as S

solver3 :: [(Int, Int)] -> String
solver3 ls =
  let ordered = reverse $ sortOn snd ls
   in let latest_dead = snd $ head ordered
       in eater latest_dead ordered
  where
    eater t [] =
      if t < 0
        then "No"
        else "Yes"
    eater t ((len, dead):rest) = (eater $! (t - len)) rest

solver4 :: [(Int, Int)] -> String
solver4 ls =
  let idxed = [(dl, len, i) | ((len, dl), i) <- zip ls [1 ..]]
   in let set = S.fromList idxed
       in let (dl, _, _) = S.findMax set
           in eater dl set
  where
    eater t s =
      if s == S.empty
        then if t < 0
               then "No"
               else "Yes"
        else let Just ((_, len, _), rest) = S.maxView s
              in eater (t - len) rest

solver5 :: [(Int, Int)] -> String
solver5 ls =
  let ordered = reverse $ sortOn snd ls
   in let latest_dead = snd $ head ordered
       in eater latest_dead ordered
  where
    eater t [] = "Yes"
    eater t ((len, dead):rest) =
      if t - len < 0
        then "No"
        else (eater $! (t - len)) rest

main :: IO ()
main = do
  n <- read <$> getLine
  dat <-
    forM
      [1 .. n]
      (\_ ->
         (\(a:b:_) -> (a, b)) . map (read . BS.unpack) . BS.words <$> BS.getLine)
  --mv <- newEmptyMVar
  --forkIO $ worker dat mv
  --forkIO $ worker (reverse dat) mv
  --ans <- takeMVar mv
  --putStrLn ans
  putStrLn $ solver5 dat

worker :: [(Int, Int)] -> MVar String -> IO ()
worker dat mv =
  let ans = (solver5 dat)
   in seq ans (putMVar mv ans)