def judge(n,a):
    table = {}
    for i in range(n):
        if a[i] in table.keys():
            print('NO')
            return
        else:
            table[a[i]] = 1
    print('YES')
    return
    
n = int(input())
a = list(map(int,input().split()))

judge(n,a) def judge(n,a):
    table = {}
    for i in range(n):
        if a[i] in table.keys():
            print('NO')
            return
        else:
            table[a[i]] = 1
    print('YES')
    return
     judge table = {} table {} for i in range(n):
        if a[i] in table.keys():
            print('NO')
            return
        else:
            table[a[i]] = 1
     i range(n) range n if a[i] in table.keys():
            print('NO')
            return
        else:
            table[a[i]] = 1
     a[i] in table.keys() a[i] a i table.keys() table.keys table keys print('NO') print 'NO' return table[a[i]] = 1 table[a[i]] table a[i] a i 1 print('YES') print 'YES' return n n a a n = int(input()) n int(input()) int input() input a = list(map(int,input().split())) a list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split judge(n,a) judge n a def judge(n,a):
    table = {}
    for i in range(n):
        if a[i] in table.keys():
            print('NO')
            return
        else:
            table[a[i]] = 1
    print('YES')
    return
     def judge(n,a):
    table = {}
    for i in range(n):
        if a[i] in table.keys():
            print('NO')
            return
        else:
            table[a[i]] = 1
    print('YES')
    return
     judge n = int(input()) int(input()) n a = list(map(int,input().split())) list(map(int,input().split())) a
def judge(n,a):
    table = {}
    for i in range(n):
        if a[i] in table.keys():
            print('NO')
            return
        else:
            table[a[i]] = 1
    print('YES')
    return
    
n = int(input())
a = list(map(int,input().split()))

judge(n,a)