fun main(args: Array<String>) {
    val n = readLine()?.toInt() ?: return
    val a = readLine()?.split(" ")?.map(String::toInt) ?: return
    val counter = hashMapOf<Int, Int>()
    a.forEach { aa ->
        counter[aa]?.let {
            println("NO")
            return
        } ?: run {
            counter[aa] = 1
        }
    }
    println("YES")
}