N = int(eval(input()))

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

cnt = {}

for a in A:

  if cnt.get(a):

    cnt[a] = cnt[a] + 1

  else:

    cnt[a] = 1

for v in list(cnt.values()):

  if v != 1:

    print('NO')

    exit()

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

A = input().split()

if len(A) == len(set(A)):

  print('YES')

else:

  print('NO')
N = int(eval(input()))
A = list(map(int, input().split()))
cnt = {}
for a in A:
    if cnt.get(a):
        cnt[a] = cnt[a] + 1
    else:
        cnt[a] = 1
for v in list(cnt.values()):
    if v != 1:
        print("NO")
        exit()
print("YES")

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

-A = list(map(int, input().split())) -cnt = {} -for a in A: -    if cnt.get(a): -        cnt[a] = cnt[a] + 1 -    else: -        cnt[a] = 1 -for v in list(cnt.values()): -    if v != 1: -        print("NO") -        exit() -print("YES") +A = input().split() +if len(A) == len(set(A)): +    print("YES") +else: +    print("NO")