import Data.List
import qualified Data.ByteString.Char8 as B
main=do
    _<-getLine
    ds<-sort.unfoldr(B.readInt.B.dropWhile(==' '))<$>B.getLine::IO[Int]
    _<-getLine
    ts<-sort.unfoldr(B.readInt.B.dropWhile(==' '))<$>B.getLine::IO[Int]
    putStrLn $ if f ds ts then "YES" else "NO"
f _ [] = True
f [] _ = False
f (d:dr) ts@(t:tr)
    | d == t = f dr tr
    | d < t  = f dr ts
    | otherwise = False