import qualified Data.IntMap.Lazy as M
 
main = do
  getLine
  d <- mkdict . map read . words <$> getLine
  getLine
  t <- map read . words <$> getLine
  putStr $ solve d t
 
mkdict [] = M.empty
mkdict (x:xs) = M.insertWith f x 1 d
  where 
    f n o = succ o
    d = mkdict xs
 
solve d [] = "YES"
solve d (x:xs)
  | M.findWithDefault 0 x d == 0 = "NO"
  | otherwise = solve d' xs
  where d' = M.adjust pred x d