import Data.List

main::IO()
main = do
    _ <- getLine
    s <- sort . words <$> getLine
    putStrLn $ checkunique s
    
checkunique :: [String] -> String
checkunique [] = "YES"
checkunique (x:y:ys) = if x == y then "NO" else checkunique ys