import Control.Monad
import Data.List
import Data.Maybe

main :: IO ()
main = do
    n <- readLn
    [as, bs] <- foldr (\s [xs, ys] -> let [x, y] = map read (words s) in [x:xs, y:ys]) [[], []] <$> replicateM n getLine

    let cs = map (\(b, a) -> (a, b)) $ sort $ zipWith (\a b -> (b, a)) as bs

    putStrLn $ if isJust (foldl (\x (a, b) -> x >>= (\c -> if c <= b - a then (Just (c + a)) else Nothing)) (Just 0) cs)
                    then "Yes"
                    else "No"