import scala.io.StdIn._

object Main  {
  def main(args: Array[String]): Unit = {
    val _ = readLine
    println(solve(readLine.split(" ")))
  }

  def solve(nums: Array[String]): String = {
    if (nums.length == nums.toSet.size) {
      "YES"
    } else {
      "NO"
    }
  }
}