import Data.IntMap
import qualified Data.IntMap as IM

import Data.List
import qualified Data.List as L
import Data.ByteString.Char8( readInt, getLine, words	)
import qualified Data.ByteString.Char8 as C8
import Data.Maybe( fromJust)
import Control.Applicative( (<$>))

main = do

    let
	intCounts = L.foldl' (\m k->IM.insertWith (+) k 1 m) IM.empty
	readBS2Int = fst . fromJust . readInt
	readLine2Ints = L.map readBS2Int . C8.words <$> C8.getLine

    n_ <- readLn::IO Int
    ds_ <- readLine2Ints
    m_ <- readLn::IO Int
    ts_ <- readLine2Ints
    let
	counter = intCounts ds_	

	proc = foldl (\c t->IM.insertWith (+) t (-1) c) counter ts_

    if Nothing==(find (<0) . IM.elems $ proc)
    then putStr "YES"
    else putStr "NO"