n = int(input())
lis = input().split()
dic = {}

for i in range(n):
  if lis[i] not in dic:
    dic[lis[i]] = 1
  else:
    dic[lis[i]] += 1
    
for x in dic.values():
  if x != 1:
    print("NO")
    exit()

print("YES") n = int(input()) n int(input()) int input() input lis = input().split() lis input().split() ().split () input split dic = {} dic {} for i in range(n):
  if lis[i] not in dic:
    dic[lis[i]] = 1
  else:
    dic[lis[i]] += 1
     i range(n) range n if lis[i] not in dic:
    dic[lis[i]] = 1
  else:
    dic[lis[i]] += 1
     lis[i] not in dic lis[i] lis i dic dic[lis[i]] = 1 dic[lis[i]] dic lis[i] lis i 1 dic[lis[i]] += 1 dic[lis[i]] dic lis[i] lis i 1 for x in dic.values():
  if x != 1:
    print("NO")
    exit() x dic.values() dic.values dic values if x != 1:
    print("NO")
    exit() x != 1 x 1 print("NO") print "NO" exit() exit print("YES") print "YES" dic = {} {} dic lis = input().split() input().split() lis n = int(input()) int(input()) n
n = int(input())
lis = input().split()
dic = {}

for i in range(n):
  if lis[i] not in dic:
    dic[lis[i]] = 1
  else:
    dic[lis[i]] += 1
    
for x in dic.values():
  if x != 1:
    print("NO")
    exit()

print("YES")