-- Try AtCoder
-- author: Leonardone @ NEETSDKASU

import qualified Data.Map as M

main = putStrLn . solve . lines =<< getContents

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