import scala.io.StdIn._
object Main extends App {
  var set: Set[String] = Set.empty
  readLine
  var flag = false
  val a = readLine.split(" ").iterator
  while (a.hasNext && !flag) {
    val aa = a.next
    if (set contains aa) {
      flag = true
    } else {
      set = set + aa
    }
  }

  println(if (flag) "NO" else "YES")
}
