import sys
#fin = open("test.txt", "r")
fin = sys.stdin

n = int(fin.readline())
A = list(map(int, fin.readline().split()))
q = int(fin.readline())
m_list = list(map(int, fin.readline().split()))

for m in m_list:
	can_compose = False
	s = [[] for i in range(n)] #s[i][m]??§???A[i]?????§???????´???§m????????????????????????????????????
	for i in range(n):
		s[i] = [False for i in range(m + 1)]

	for j in range(m + 1):
		if j == A[0]:
			s[0][j] = True
		else:
			s[0][j] = False
		
	if s[0][m]:
		can_compose = True
		
	if not can_compose:
		for i in range(1, n):
			for j in range(m + 1):
				if j == A[i]:
					s[i][j] = True
				elif s[i - 1][j]:
					s[i][j] = True
				else:
					if j - A[i] >= 0:
						s[i][j] = s[i - 1][j - A[i]]
			
			if s[i][m]:
				can_compose = True
				break

	if can_compose:
		print("yes")
	else:
		print("no") import sys sys fin = sys.stdin fin sys.stdin sys stdin n = int(fin.readline()) n int(fin.readline()) int fin.readline() fin.readline fin readline A = list(map(int, fin.readline().split())) A list(map(int, fin.readline().split())) list map(int, fin.readline().split()) map int fin.readline().split() fin.readline().split fin.readline() fin.readline fin readline split q = int(fin.readline()) q int(fin.readline()) int fin.readline() fin.readline fin readline m_list = list(map(int, fin.readline().split())) m_list list(map(int, fin.readline().split())) list map(int, fin.readline().split()) map int fin.readline().split() fin.readline().split fin.readline() fin.readline fin readline split for m in m_list:
	can_compose = False
	s = [[] for i in range(n)] #s[i][m]??§???A[i]?????§???????´???§m????????????????????????????????????
	for i in range(n):
		s[i] = [False for i in range(m + 1)]

	for j in range(m + 1):
		if j == A[0]:
			s[0][j] = True
		else:
			s[0][j] = False
		
	if s[0][m]:
		can_compose = True
		
	if not can_compose:
		for i in range(1, n):
			for j in range(m + 1):
				if j == A[i]:
					s[i][j] = True
				elif s[i - 1][j]:
					s[i][j] = True
				else:
					if j - A[i] >= 0:
						s[i][j] = s[i - 1][j - A[i]]
			
			if s[i][m]:
				can_compose = True
				break

	if can_compose:
		print("yes")
	else:
		print("no") m m_list can_compose = False can_compose False [] for i in range(n) for i in range(n) i range(n) range n for i in range(n) [] s = [[] for i in range(n)] s [[] for i in range(n)] for i in range(n):
		s[i] = [False for i in range(m + 1)]

	 i range(n) range n False for i in range(m + 1) for i in range(m + 1) i range(m + 1) range m + 1 m 1 for i in range(m + 1) False s[i] = [False for i in range(m + 1)] s[i] s i [False for i in range(m + 1)] for j in range(m + 1):
		if j == A[0]:
			s[0][j] = True
		else:
			s[0][j] = False
		
	 j range(m + 1) range m + 1 m 1 if j == A[0]:
			s[0][j] = True
		else:
			s[0][j] = False
		
	 j == A[0] j A[0] A 0 s[0][j] = True s[0][j] [0] s 0 j True s[0][j] = False s[0][j] [0] s 0 j False if s[0][m]:
		can_compose = True
		
	 s[0][m] [0] s 0 m can_compose = True can_compose True if not can_compose:
		for i in range(1, n):
			for j in range(m + 1):
				if j == A[i]:
					s[i][j] = True
				elif s[i - 1][j]:
					s[i][j] = True
				else:
					if j - A[i] >= 0:
						s[i][j] = s[i - 1][j - A[i]]
			
			if s[i][m]:
				can_compose = True
				break

	 not can_compose can_compose for i in range(1, n):
			for j in range(m + 1):
				if j == A[i]:
					s[i][j] = True
				elif s[i - 1][j]:
					s[i][j] = True
				else:
					if j - A[i] >= 0:
						s[i][j] = s[i - 1][j - A[i]]
			
			if s[i][m]:
				can_compose = True
				break

	 i range(1, n) range 1 n for j in range(m + 1):
				if j == A[i]:
					s[i][j] = True
				elif s[i - 1][j]:
					s[i][j] = True
				else:
					if j - A[i] >= 0:
						s[i][j] = s[i - 1][j - A[i]]
			
			 j range(m + 1) range m + 1 m 1 if j == A[i]:
					s[i][j] = True
				elif s[i - 1][j]:
					s[i][j] = True
				else:
					if j - A[i] >= 0:
						s[i][j] = s[i - 1][j - A[i]]
			
			 j == A[i] j A[i] A i s[i][j] = True s[i][j] [i] s i j True elif s[i - 1][j]:
					s[i][j] = True
				 s[i - 1][j] [i - 1] s i - 1 i 1 j s[i][j] = True s[i][j] [i] s i j True if j - A[i] >= 0:
						s[i][j] = s[i - 1][j - A[i]]
			
			 j - A[i] >= 0 j - A[i] j A[i] A i 0 s[i][j] = s[i - 1][j - A[i]] s[i][j] [i] s i j s[i - 1][j - A[i]] [i - 1] s i - 1 i 1 j - A[i] j A[i] A i if s[i][m]:
				can_compose = True
				break

	 s[i][m] [i] s i m can_compose = True can_compose True break if can_compose:
		print("yes")
	else:
		print("no") can_compose print("yes") print "yes" print("no") print "no" A = list(map(int, fin.readline().split())) list(map(int, fin.readline().split())) A can_compose = True True can_compose n = int(fin.readline()) int(fin.readline()) n fin = sys.stdin sys.stdin fin q = int(fin.readline()) int(fin.readline()) q m_list = list(map(int, fin.readline().split())) list(map(int, fin.readline().split())) m_list s = [[] for i in range(n)] [[] for i in range(n)] s can_compose = True True can_compose can_compose = False False can_compose
import sys
#fin = open("test.txt", "r")
fin = sys.stdin

n = int(fin.readline())
A = list(map(int, fin.readline().split()))
q = int(fin.readline())
m_list = list(map(int, fin.readline().split()))

for m in m_list:
	can_compose = False
	s = [[] for i in range(n)] #s[i][m]??§???A[i]?????§???????´???§m????????????????????????????????????
	for i in range(n):
		s[i] = [False for i in range(m + 1)]

	for j in range(m + 1):
		if j == A[0]:
			s[0][j] = True
		else:
			s[0][j] = False
		
	if s[0][m]:
		can_compose = True
		
	if not can_compose:
		for i in range(1, n):
			for j in range(m + 1):
				if j == A[i]:
					s[i][j] = True
				elif s[i - 1][j]:
					s[i][j] = True
				else:
					if j - A[i] >= 0:
						s[i][j] = s[i - 1][j - A[i]]
			
			if s[i][m]:
				can_compose = True
				break

	if can_compose:
		print("yes")
	else:
		print("no")