{-# OPTIONS_GHC -fno-warn-unused-binds -O2 #-}
{-# LANGUAGE ScopedTypeVariables #-}

import           Data.ByteString.Char8          ( ByteString )
import qualified Data.ByteString.Char8         as BS
import           Data.Vector.Unboxed            ( Vector
                                                , Unbox
                                                )
import qualified Data.Vector.Unboxed           as VU
import qualified Data.Vector.Unboxed.Mutable   as VUM
-- import qualified Data.Vector.Algorithms.Intro  as VA -- not in AtCoder
import           Data.Maybe                     ( fromJust )
import           Data.Ord                       ( comparing )

-- pipeline operator
-- see https://tex2e.github.io/blog/haskell/pipeline-operator
infixl 1 |>
(|>) :: a -> (a -> b) -> b
(|>) a f = f a

-- read
readInt :: ByteString -> Int
-- readInt = fst . fromJust . BS.readInt
readInt s = s |> BS.readInt |> fromJust |> fst

readInt2 :: ByteString -> (Int, Int)
readInt2 s = s |> BS.words |> map readInt |> tup2

readInt3 :: ByteString -> (Int, Int, Int)
readInt3 s = s |> BS.words |> map readInt |> tup3

readLnInt :: IO Int
readLnInt = readInt <$> BS.getLine

readLnInts :: IO (Vector Int)
readLnInts = readInts <$> BS.getLine
  where readInts s = s |> BS.words |> map readInt |> VU.fromList

tup2 :: [a] -> (a, a)
tup2 [x, y] = (x, y)
tup2 _      = undefined

tup3 :: [a] -> (a, a, a)
tup3 [x, y, z] = (x, y, z)
tup3 _         = undefined

-- merge sort
type Comparison a = a -> a -> Ordering

sortBy :: forall a. Unbox a => Comparison a -> Vector a -> Vector a
sortBy comp = mergeSort
 where
  mergeSort :: Unbox a => Vector a -> Vector a
  mergeSort v | n <= 1    = v
              | otherwise = merge (mergeSort v1) (mergeSort v2)
   where
    n        = VU.length v
    (v1, v2) = VU.splitAt (n `div` 2) v
  merge :: Unbox a => Vector a -> Vector a -> Vector a
  merge v1 v2 = VU.create $ do
    let n = VU.length v1 + VU.length v2
    m <- VUM.new n
    let loop i v1' v2'
          | i == n = return ()
          | VU.null v1' = VU.copy (VUM.drop i m) v2'
          | VU.null v2' = VU.copy (VUM.drop i m) v1'
          | otherwise = case comp (VU.unsafeHead v1') (VU.unsafeHead v2') of
            LT -> do
              VUM.write m i $ VU.unsafeHead v1'
              loop (i + 1) (VU.unsafeTail v1') v2'
            GT -> do
              VUM.write m i $ VU.unsafeHead v2'
              loop (i + 1) v1' $ VU.unsafeTail v2'
            EQ -> do
              VUM.write m i $ VU.unsafeHead v1'
              VUM.write m (i + 1) $ VU.unsafeHead v2'
              loop (i + 2) (VU.unsafeTail v1') (VU.unsafeTail v2')
    loop 0 v1 v2
    return m

sortOn :: (Unbox a, Ord b) => (a -> b) -> Vector a -> Vector a
sortOn f = sortBy (comparing f)

sort :: (Unbox a, Ord a) => Vector a -> Vector a
sort = sortOn id

-- main
main :: IO ()
main = do
  n      <- readLnInt
  (a, b) <- VU.unzip <$> VU.replicateM n (readInt2 <$> BS.getLine)
  putStrLn $ if solve a b then "Yes" else "No"

solve :: Vector Int -> Vector Int -> Bool
solve a b = VU.foldl f (True, 0) ab |> fst
 where
  f (res, t) (a_i, b_i) = (res && b_i - t >= a_i, t + a_i)
  ab = sortOn snd $ VU.zip a b
