import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val a = (0 until n).map {
        sc.nextInt()
    }
 
    abc154c(n ,a)
}
 
fun abc154c(n: Int, a: List<Int>) {
    val a = a.sorted()
    var ans = "YES"
    var pre = 0
    for (i in 0 until n) {
        if (a[i] == pre) {
            ans = "NO"
            break
        }
        pre = a.get(i)
    }
 
    println(ans)
}