"use strict";
function main(input) {
  let n = input[1].split(" ");
  n.sort(function(a, b) {
  	return a - b;
  });
  let before = -1; 
  for(let i=0;i<n.length;i++){
    if(n[i]===before){
       console.log("NO");
    }else if(i === n.length-1){
      console.log("YES");
    }
    before = n[i];
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));