N = int(eval(input()))

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



A.sort()

ans = "YES"

for i in range(N-1):

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

        ans = "NO"

        break



print(ans)
N = int(eval(input()))

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



ans ="YES" if len(set(A))==N else "NO"



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

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

-A.sort() -ans = "YES" -for i in range(N - 1): -    if A[i] == A[i + 1]: -        ans = "NO" -        break +ans = "YES" if len(set(A)) == N else "NO"