import qualified Data.IntSet as IntSet
import qualified Data.ByteString.Char8 as BS

main = do
  n <- readLn
  a <- map (read . BS.unpack) . BS.words <$> BS.getLine
  putStrLn $
    if n == IntSet.size (IntSet.fromList a)
      then "YES"
      else "NO"

