N = int(eval(input()))

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



_A = set(A)



if len(A) == len(_A):

    print('YES')

else:

    print('NO')

N = eval(input())

A = input().split()



_A = set(A)



if len(A) == len(_A):

    print('YES')

else:

    print('NO')

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

N = eval(input())
A = input().split()
_A = set(A)
if len(A) == len(_A):
    print("YES")
else:
    print("NO")

-N = int(eval(input())) -A = list(map(int, input().split())) +N = eval(input()) +A = input().split()