module Main where

import           Data.List

toInt :: String -> Int
toInt s = read s :: Int

anySame :: Eq a => [a] -> Bool
anySame [] = False
anySame (x : y : xs) | x == y    = True
                     | otherwise = anySame (y : xs)

main :: IO ()
main = do
  getLine
  l <- getLine
  let ll = map toInt $ words l
  putStrLn $ if anySame $ sort ll then "NO" else "YES"
