n = int(eval(input()))

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



b = list(set(a))



if sorted(a) == sorted(b):

  print('YES')

else:

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

a = list(input().split())



b = list(set(a))

if len(a) == len(b):

  print('YES')

else:

  print('NO')
n = int(eval(input()))
a = list(map(int, input().split()))
b = list(set(a))
if sorted(a) == sorted(b):
    print("YES")
else:
    print("NO")

n = int(eval(input()))
a = list(input().split())
b = list(set(a))
if len(a) == len(b):
    print("YES")
else:
    print("NO")

-a = list(map(int, input().split())) +a = list(input().split()) -if sorted(a) == sorted(b): +if len(a) == len(b):