object Main extends App{
  import java.io.{BufferedOutputStream, BufferedReader, InputStreamReader, PrintWriter}
  val in=new BufferedReader(new InputStreamReader(System.in))
  val out = new PrintWriter(new BufferedOutputStream(System.out))
  val n = in.readLine().toInt
  val s=in.readLine().split(" ").map(_.toInt)
  val m = scala.collection.mutable.HashMap[Int,Int]()
  for{i <- ( 0 until(n) )}{
    m(s(i)) = if(m.contains(s(i))) m(s(i)) + 1 else 0
  }
  var ans = "YES"
  m.toSeq.collect{case r if r._2 > 0 => ans = "NO"}
  out.println(ans)
  out.flush()
}