"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 map = {};
  let ret = 'YES';
  for(let i=0; i<N; i++){
    map[A[i]] = map[A[i]] ? map[A[i]] + 1 : 1;
  }

  for(let k in map){
    if(map[k] > 1){
      ret = 'NO';
      break;
    }
  }

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