import std.stdio, std.conv, std.string, std.algorithm,
       std.math, std.array, std.container, std.typecons;

bool solve() {
  readln;
  auto a = readln.chomp.split.to!(long[]);
  std.algorithm.sort(a);
  for(long i=1; i<a.length; i++) if(a[i]==a[i-1]) return false;
  return true;
}

void main() {
  if(solve) writeln("YES");
  else writeln("NO");
}

