import Data.multiSet

solver2::MultiSet Int->[Int]->Bool
solver2 set [] = True
solver2 set (y:ys) = if (member y set) then solver2 (delete y set) ys else False


main::IO()
main=do
  _<-getLine
  prop<-getLine
  let set = fromList (map read (words prop))
  _<-getLine
  need<-getLine
  let q = map read (words need)
  putStr (if solver2 set q then "YES\n" else "NO\n") 