N = int(eval(input()))

A_ls = list(map(int, input().split(' ')))

rst = set()

for i in A_ls:

    rst.add(i)

if len(rst) == N:

    print('YES')

else:

    print('NO')
N = int(eval(input()))

A_ls = list(input().split(' '))

A_set = { i for i in A_ls }

if len(A_set) == N:

    print('YES')

else:

    print('NO')
N = int(eval(input()))
A_ls = list(map(int, input().split(" ")))
rst = set()
for i in A_ls:
    rst.add(i)
if len(rst) == N:
    print("YES")
else:
    print("NO")

N = int(eval(input()))
A_ls = list(input().split(" "))
A_set = {i for i in A_ls}
if len(A_set) == N:
    print("YES")
else:
    print("NO")

-A_ls = list(map(int, input().split(" "))) -rst = set() -for i in A_ls: -    rst.add(i) -if len(rst) == N: +A_ls = list(input().split(" ")) +A_set = {i for i in A_ls} +if len(A_set) == N: