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

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