import scala.io.StdIn._

object Main extends App {


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

  def solve(): String = {
    if(A.toSet.size == A.length) "YES" else "NO"
  }

  println(solve())

}

