"use strict";
main(
  require("fs")
    .readFileSync("/dev/stdin", "UTF-8")
    .trim()
    .split("\n")
);

function main(input) {
  let test = input[1].split(" ").filter((x, i, self) => self.indexOf(x) === i);
  console.log(test.length === parseInt(input[0]) ? "YES" : "NO");
}
