import java.util.*

fun main(args: Array<String>) {
  val n = readLine()!!.toLong()
  val distincted = readLine()!!.split(" ").distinct().size.toLong()
  println( if(n == distincted) "YES" else "NO")
}