import scala.io.StdIn.readLine

object Main extends App {

  readLine()
  val xs = readLine().split(" ").map(_.toLong)

  if (xs.length == xs.distinct.length)
    println("YES")
  else
    println("NO")
}
