import Data.Set (fromList, size)

main = do
    _ <- getLine
    as <- fmap (fmap read . words) getLine :: IO [Int]
    ans <- pure $ if length as == (size $ fromList as) then "YES" else "NO"
    putStrLn ans