N=int(eval(input()))

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

P=set(S)

Q=len(P)

if N==Q:

	print("YES")

else:

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

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

if N==len(set(L)):

  print("YES")

else:

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

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

-S = list(map(int, input().split())) -P = set(S) -Q = len(P) -if N == Q: +L = list(map(int, input().split())) +if N == len(set(L)):