n, *a = list(map(int, open(0).read().split()))

print(("YNEOS"[len(set(a))!=len(a)::2]))
n=int(eval(input()));print(("YNEOS"[n!=len(set(input().split()))::2]))
n, *a = list(map(int, open(0).read().split()))
print(("YNEOS"[len(set(a)) != len(a) :: 2]))

n = int(eval(input()))
print(("YNEOS"[n != len(set(input().split())) :: 2]))

-n, *a = list(map(int, open(0).read().split())) -print(("YNEOS"[len(set(a)) != len(a) :: 2])) +n = int(eval(input())) +print(("YNEOS"[n != len(set(input().split())) :: 2]))