'use strict';

function main(input) {
  const args = input.split('\n');
  const nums = args[1].split(' ');
  nums.sort();
  for (let i = 0; i < nums.length-1; ++i) {
    if (nums[i] === nums[i+1]) {
      console.log('NO');
      return;
    }
  }
  console.log('YES');
}

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