module Main where

hasDuplicate [] = False
hasDuplicate [_] = False
hasDuplicate (h:tail) = if h `elem` tail
                           then True
                           else hasDuplicate tail

main :: IO ()
main =
  (read :: String -> Int) <$> getLine >>= \n ->
  (map (read :: String -> Int) . words) <$> getLine >>= \arr ->
  if hasDuplicate arr
     then putStrLn "NO"
     else putStrLn "YES"
