module Main where

import Data.List

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

anySame :: Eq a => [a] -> Bool
anySame = f []
 where
  f seen (x : xs) = x `elem` seen || f (x : seen) xs
  f seen []       = False

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