N = int(eval(input()))

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

flag = 0

A.sort()

for i in range(len(A)-1):

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

        flag += 1

        print("NO")

        break

    else:

        continue

if flag == 0:

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

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

S = set(A)

if len(A) == len(S):

  print("YES")

else:

  print("NO")
N = int(eval(input()))
A = list(map(int, input().split()))
flag = 0
A.sort()
for i in range(len(A) - 1):
    if A[i] == A[i + 1]:
        flag += 1
        print("NO")
        break
    else:
        continue
if flag == 0:
    print("YES")

N = int(eval(input()))
A = list(map(int, input().split()))
S = set(A)
if len(A) == len(S):
    print("YES")
else:
    print("NO")

-flag = 0 -A.sort() -for i in range(len(A) - 1): -    if A[i] == A[i + 1]: -        flag += 1 -        print("NO") -        break -    else: -        continue -if flag == 0: +S = set(A) +if len(A) == len(S): +else: +    print("NO")