Rng is preparing a problem set for a qualification round of CODEFESTIVAL.  He has N candidates of problems. The difficulty of the i-th candidate is D_i.  There must be M problems in the problem set, and the difficulty of the i-th problem must be T_i. Here, one candidate of a problem cannot be used as multiple problems.  Determine whether Rng can complete the problem set without creating new candidates of problems.
from collections import Counter
n = int(input())
d = [int(i) for i in input().split()]
m = int(input())
t = [int(i) for i in input().split()]
dc,tc,flag = Counter(d),Counter(t),True
for i in tc.most_common():
	if i[0] not in d:
		flag = False
		break
	elif i[1]>dc[i[0]]:
		flag = False
		break
if flag: print("Yes")
else: print("No")
from collections import Counter
from bisect import bisect
n = int(input())
d = [int(i) for i in input().split()]
m = int(input())
t = [int(i) for i in input().split()]
d,tc,flag = sorted(d),Counter(t),True
for i in tc.most_common():
	if bisect(d,i[0])-bisect(d,i[0]-1)<i[1]:
		flag = False
		break
if flag: print("YES")
else: print("NO")