import Data.List
import qualified Data.ByteString.Char8 as B
main :: IO ()
main = getLine >> breads >>= main' . sort
    where
        main' ds = getLine >> breads >>= putStrLn . solve ds . sort

solve :: [Int] -> [Int] -> String
solve (d : ds) (t : ts)
    | d > t = "NO"
    | d < t = solve ds (t : ts)
    | otherwise = solve ds ts
solve _ [] = "YES"
solve _ _ = "NO"


breads :: IO [Int]
breads = unfoldr uff <$> B.getLine
    where
        uff b = check <$> B.readInt b
        check (a, b)
            | B.null b = (a, b)
            | otherwise = (a, B.tail b)
