from collections import Counter

N=int(eval(input()))

A=list(map(int,input().split()))



c = Counter(A).most_common()



for i in range(len(c)):

  if c[i][1]>1:

    print("NO")

    exit()



print("YES")

  
N = int(eval(input()))

A = [int(a) for a in input().split()]

B = set(A)



if len(A)==len(B):

  print("YES")

else:

  print("NO")
from collections import Counter

N = int(eval(input()))
A = list(map(int, input().split()))
c = Counter(A).most_common()
for i in range(len(c)):
    if c[i][1] > 1:
        print("NO")
        exit()
print("YES")

N = int(eval(input()))
A = [int(a) for a in input().split()]
B = set(A)
if len(A) == len(B):
    print("YES")
else:
    print("NO")

-from collections import Counter - -A = list(map(int, input().split())) -c = Counter(A).most_common() -for i in range(len(c)): -    if c[i][1] > 1: -        print("NO") -        exit() -print("YES") +A = [int(a) for a in input().split()] +B = set(A) +if len(A) == len(B): +    print("YES") +else: +    print("NO")