"use strict"
function main(arg) {
    var data = arg.trim().split("\n")[1].split(" ").map(Number)
    data = data.sort((a,b) => a - b)
    var ans = 'YES'
    for (var i = 1; i < data.length; i++) {
        if (data[i - 1] === data[i]) {
            ans = 'NO'
            break
        }
    }
    console.log(ans)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));