import std;

alias sread = () => readln.chomp();
alias lread = () => readln.chomp.to!long();
alias aryread(T = long) = () => readln.split.to!(T[]);

void main()
{
    auto n = lread();
    auto a = aryread();
    long[long] ary;
    foreach (i; 0 .. n)
    {
        ary[a[i]] = ary.get(a[i], 0) + 1;
    }
    foreach (value; ary)
    {
        if (value > 1)
        {
            writeln("NO");
            return;
        }
    }
    writeln("YES");

}

void scan(L...)(ref L A)
{
    auto l = readln.split;
    foreach (i, T; L)
    {
        A[i] = l[i].to!T;
    }
}
