N = int(eval(input()))

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



flag = False

for i in range(1,N):

    if A[i-1] == A[i]:

        flag = True

    

if flag:

    print("NO")

else:

    print("YES")
N = int(eval(input()))

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



from collections import Counter



Acnt = Counter(A)

flag = False

for _, cnt in list(Acnt.items()):

    if cnt > 1:

        flag = True



if flag:

    print("NO")

else:

    print("YES")
N = int(eval(input()))
A = sorted([int(i) for i in input().split()])
flag = False
for i in range(1, N):
    if A[i - 1] == A[i]:
        flag = True
if flag:
    print("NO")
else:
    print("YES")

N = int(eval(input()))
A = [int(i) for i in input().split()]
from collections import Counter

Acnt = Counter(A)
flag = False
for _, cnt in list(Acnt.items()):
    if cnt > 1:
        flag = True
if flag:
    print("NO")
else:
    print("YES")

-A = sorted([int(i) for i in input().split()]) +A = [int(i) for i in input().split()] +from collections import Counter + +Acnt = Counter(A) -for i in range(1, N): -    if A[i - 1] == A[i]: +for _, cnt in list(Acnt.items()): +    if cnt > 1: