"use strict";

function Main(input) {
  let N = input.trim().split("\n")[0];
  let Nums = input.trim().split("\n")[1].split(" ").map(x=> x*1);
  // よそからもらってきたコード
  let uniqNum = Nums.filter(function (x, i, self) {
            return self.indexOf(x) === i;
  });
  let ans = "YES";
  if(Nums.length !== uniqNum.length){
  	ans = "NO"
  }
  
  console.log(`${ans}`);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));

