import           Control.Monad
import qualified Data.ByteString.Char8 as BS
import           Data.Maybe
import qualified Data.Sequence         as Seq

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
  n <- getInt
  as <- (Seq.unstableSort . Seq.fromList) <$> getIntList
  bs <- (Seq.unstableSort . Seq.fromList) <$> getIntList

  let solve xs ys res | Seq.length xs == 0 = res
                      | otherwise =
                        let (x Seq.:< xs') = Seq.viewl xs
                            (y Seq.:< ys') = Seq.viewl ys
                        in if x <= y
                           then solve xs' ys' (res + (y-x))
                           else -1

      ans = if solve as bs 0 >= 0 then "Yes" else "No"

  putStrLn ans