function main(input) {
  const inputs =input.split('\n')
  const [N] = inputs[0].split(' ').map(Number)
  const A = inputs[1].split(' ').map(Number)
  const len = A.length
  const slen = (new Set(A)).size
  console.log(len === slen ? 'YES' : 'NO')
}

main(require('fs').readFileSync('/dev/stdin', 'utf8').trim())
