N=int(input())
A=input().split()
S={}
for a in A:
  if a in S.keys():
    print('NO')
    break
  S[a]=1
else:
  print('YES') N=int(input()) N int(input()) int input() input A=input().split() A input().split() ().split () input split S={} S {} for a in A:
  if a in S.keys():
    print('NO')
    break
  S[a]=1
else:
  print('YES') a A if a in S.keys():
    print('NO')
    break
   a in S.keys() a S.keys() S.keys S keys print('NO') print 'NO' break S[a]=1 S[a] S a 1 print('YES') print 'YES' S={} {} S A=input().split() input().split() A N=int(input()) int(input()) N
N=int(input())
A=input().split()
S={}
for a in A:
  if a in S.keys():
    print('NO')
    break
  S[a]=1
else:
  print('YES')