import Data.List
main :: IO ()
main = do
  getLine
  line <- getLine
  putStrLn $ isUniq $ sort $ words line

isUniq :: [String] -> String
isUniq [] = "YES"
isUniq [_] = "YES"
isUniq (x:y:xs) 
  | x == y  = "NO"
  | otherwise = isUniq (y:xs)