-- Try AtCoder
-- author: Leonardone @ NEETSDKASU

import qualified Data.ByteString.Char8 as C
import Data.List (sort)

main = putStrLn . solve . C.lines =<< C.getContents

solve [n,ds,m,ts] = if ans then "YES" else "NO"
    where
        n' = C.readInt n
        m' = C.readInt m
        ds' = sort $ map C.readInt $ C.words ds
        ts' = sort $ map C.readInt $ C.words ts
        ans = n' >= m' && f ts' ds'
        f [] _  = True
        f _  [] = False
        f xs@(x:xxs) ys@(y:yys) | x == y = f xxs yys
                                | x >  y = f xs  yys
                                | otherwise = False