-- Try AtCoder
-- author: Leonardone @ NEETSDKASU

import Data.List (sort)

main = putStrLn . solve . lines =<< getContents

solve [n,ds,m,ts] = if ans then "YES" else "NO"
    where
        n' = read n :: Int
        m' = read m
        ds' = sort $ map read $ words ds :: [Int]
        ts' = sort $ map read $ 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