function main(input) {
  const args = input.split('\n');
  const nums = args[1].split(' ');
  var ans = nums.every((number, index) => {
    nums.indexOf(number) === index;
  });
  if (ans) {
    console.log('YES');
  } else {
    console.log('NO');
  }
}

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