import scala.io.StdIn._

object Main extends App {


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

  def solve(): String = {
    val sorted = A.sorted
    (1 until A.length).foreach { i =>
      if(sorted(i-1) == sorted(i)) return "NO"
    }
    "YES"
  }

  println(solve())

}

