"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");

function print(x) {
  console.log(x);
}

let inputString = "";
let currentLine = 0;

process.stdin.on("data", inputStdin => {
  inputString += inputStdin;
});
process.stdin.on("end", () => {
  inputString = inputString.split("\n");
  main();
});
function readline() {
  return inputString[currentLine++];
}

// ************************ Ignore above this Line ******************************
// **************************** Main Code Start *********************************

function main() {
  var n = Number(readline());
  var ar = readline().split(' ').map(x => parseInt(x));
  
  var ar2 = Array.from(new Set(ar));
  print(JSON.stringify(ar) == JSON.stringify(ar2) ? 'YES' : 'NO');

}

