-- Your code here!
import Data.List
import qualified Data.ByteString.Char8 as BC


main = do
    _ <- BC.getLine
    nums <- BC.words <$> BC.getLine
    putStrLn $ if length nums == (length . nub $ nums) then "YES" else "NO"