
fun main(args: Array<String>) {
    val number=readLine()!!.toInt()
    var list = readLine()!!.split(" ").map(String::toInt)
    list=list.sorted()
    for (x in 0 until number-1){
        if (list[x]==list[x+1]){
            println("NO")
            return
        }
    }
    println("YES")
}