"use strict"
function Main(input) {
  input = input.trim().split('\n');
  const N = Number(input[0].trim());
  const A = input[1].trim().split(' ').map(Number);
  
  let ret = 'YES';
  for(let i=0; i<N; i++){
    let r = A.filter((val) => {
      return val === A[i];
    })
    if(r.length > 1){
      ret = 'NO';
      break;
    }
  }

  console.log(ret);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));