import scala.io.StdIn._

object Main extends App {


  val n = readInt()
  val A = readLine().split(" ").map(_.toInt)

  def solve(): String = {
    A.foldLeft(Map.empty[Int, Int]) { (acc, num) =>
      acc.get(num) match {
        case Some(_) => return "NO"
        case None => acc.updated(num, 1)
      }
    }
    "YES"
  }

  println(solve())

}

