import collections
N = int(input())
A = list(map(int, input().split()))

C = collections.Counter(A)

V = C.values()
L = list(V)


for i in range(len(L)):
    if L[i] > 1:
        print('NO')
        exit()
        
print('YES') import collections collections 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 C = collections.Counter(A) C collections.Counter(A) collections.Counter collections Counter A V = C.values() V C.values() C.values C values L = list(V) L list(V) list V for i in range(len(L)):
    if L[i] > 1:
        print('NO')
        exit()
         i range(len(L)) range len(L) len L if L[i] > 1:
        print('NO')
        exit()
         L[i] > 1 L[i] L i 1 print('NO') print 'NO' exit() exit print('YES') print 'YES' A = list(map(int, input().split())) list(map(int, input().split())) A N = int(input()) int(input()) N V = C.values() C.values() V C = collections.Counter(A) collections.Counter(A) C L = list(V) list(V) L
import collections
N = int(input())
A = list(map(int, input().split()))

C = collections.Counter(A)

V = C.values()
L = list(V)


for i in range(len(L)):
    if L[i] > 1:
        print('NO')
        exit()
        
print('YES')