N = int(eval(input()))



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

numList.sort()



ans = "YES"



for z in range(N-1):

  if numList[z] == numList[z+1]:

    ans = "NO"

    break

    

print(ans)
n = int(eval(input()))

a_list = [i for i in input().split()]



a_set = set(a_list)



if len(a_set) == n:

    print('YES')

else:

    print('NO')

N = int(eval(input()))
numList = list(map(int, input().split()))
numList.sort()
ans = "YES"
for z in range(N - 1):
    if numList[z] == numList[z + 1]:
        ans = "NO"
        break
print(ans)

n = int(eval(input()))
a_list = [i for i in input().split()]
a_set = set(a_list)
if len(a_set) == n:
    print("YES")
else:
    print("NO")

-N = int(eval(input())) -numList = list(map(int, input().split())) -numList.sort() -ans = "YES" -for z in range(N - 1): -    if numList[z] == numList[z + 1]: -        ans = "NO" -        break -print(ans) +n = int(eval(input())) +a_list = [i for i in input().split()] +a_set = set(a_list) +if len(a_set) == n: +    print("YES") +else: +    print("NO")