def resolve():
    n = int(input())
    a = tuple(map(int,input().split()))
    print('YES' if len(a)==len(set(a)) else 'NO')
resolve() def resolve():
    n = int(input())
    a = tuple(map(int,input().split()))
    print('YES' if len(a)==len(set(a)) else 'NO') resolve n = int(input()) n int(input()) int input() input a = tuple(map(int,input().split())) a tuple(map(int,input().split())) tuple map(int,input().split()) map int input().split() ().split () input split print('YES' if len(a)==len(set(a)) else 'NO') print 'YES' if len(a)==len(set(a)) else 'NO' len(a)==len(set(a)) len(a) len a len(set(a)) len set(a) set a 'YES' 'NO' resolve() resolve def resolve():
    n = int(input())
    a = tuple(map(int,input().split()))
    print('YES' if len(a)==len(set(a)) else 'NO') def resolve():
    n = int(input())
    a = tuple(map(int,input().split()))
    print('YES' if len(a)==len(set(a)) else 'NO') resolve
def resolve():
    n = int(input())
    a = tuple(map(int,input().split()))
    print('YES' if len(a)==len(set(a)) else 'NO')
resolve()