import scala.collection.mutable
import scala.util.control.Breaks._

object Main extends App {
  val n = io.StdIn.readInt()
  val an = io.StdIn.readLine().split(' ').map(_.toInt)
  val cache = mutable.Set.empty[Int]
  var ans = "YES"
  breakable {
    for (a <- an) if (cache(a)) {ans = "NO"; break()} else cache(a) = true
  }
  println(ans)
}