-- Try AtCoder
-- author: Leonardone @ NEETSDKASU
     
import qualified Data.ByteString.Char8 as C
import qualified Data.IntMap as M
import Data.Maybe (fromJust)
 
main = putStrLn . solve . C.lines =<< C.getContents
 
solve [_,ds,_,ts] = if ans then "YES" else "NO"
    where
        ds' = map (fst . fromJust . C.readInt) $ C.words ds
        ts' = map (fst . fromJust . C.readInt) $ C.words ts
        mp = foldl (\m x -> M.insertWith (+) x 1 m) M.empty ds'
        mp' = foldl (\m x -> M.insertWith (+) x (-1) m) mp ts'
        ans = (minimum $ M.elems mp') >= 0