def subset_sum(s, a):
	dict = {}
	return subset_rec(0, s, a, dict)
	
def subset_rec(i, s, a, dict):
	key = str(i) + '-' + str(s)
	ret = False
	if key in dict:
		ret = dict[key]
	elif s == 0:
		ret = True
	elif i >= len(a):
		ret =  False
	else:
		ret = subset_rec(i+1, s-a[i], a, dict) or subset_rec(i+1, s, a, dict)
	dict[key] = ret
	return ret	

n = int(input())
a = list(map(int, input().split()))
p = int(input())
q = list(map(int, input().split()))
for i in range(p):
	if subset_sum(q[i], a):
		print('yes')
	else:
		print('no')
 def subset_sum(s, a):
	dict = {}
	return subset_rec(0, s, a, dict)
	 subset_sum dict = {} dict {} return subset_rec(0, s, a, dict) subset_rec(0, s, a, dict) subset_rec 0 s a dict s s a a def subset_rec(i, s, a, dict):
	key = str(i) + '-' + str(s)
	ret = False
	if key in dict:
		ret = dict[key]
	elif s == 0:
		ret = True
	elif i >= len(a):
		ret =  False
	else:
		ret = subset_rec(i+1, s-a[i], a, dict) or subset_rec(i+1, s, a, dict)
	dict[key] = ret
	return ret	 subset_rec key = str(i) + '-' + str(s) key str(i) + '-' + str(s) str(i) + '-' str(i) str i '-' str(s) str s ret = False ret False if key in dict:
		ret = dict[key]
	elif s == 0:
		ret = True
	elif i >= len(a):
		ret =  False
	else:
		ret = subset_rec(i+1, s-a[i], a, dict) or subset_rec(i+1, s, a, dict)
	 key in dict key dict ret = dict[key] ret dict[key] dict key elif s == 0:
		ret = True
	 s == 0 s 0 ret = True ret True elif i >= len(a):
		ret =  False
	 i >= len(a) i len(a) len a ret =  False ret False ret = subset_rec(i+1, s-a[i], a, dict) or subset_rec(i+1, s, a, dict) ret subset_rec(i+1, s-a[i], a, dict) or subset_rec(i+1, s, a, dict) subset_rec(i+1, s-a[i], a, dict) subset_rec i+1 i 1 s-a[i] s a[i] a i a dict subset_rec(i+1, s, a, dict) subset_rec i+1 i 1 s a dict dict[key] = ret dict[key] dict key ret return ret ret i i s s a a dict dict n = int(input()) n int(input()) int input() input a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split p = int(input()) p int(input()) int input() input q = list(map(int, input().split())) q list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split for i in range(p):
	if subset_sum(q[i], a):
		print('yes')
	else:
		print('no') i range(p) range p if subset_sum(q[i], a):
		print('yes')
	else:
		print('no') subset_sum(q[i], a) subset_sum q[i] q i a print('yes') print 'yes' print('no') print 'no' p = int(input()) int(input()) p def subset_sum(s, a):
	dict = {}
	return subset_rec(0, s, a, dict)
	 def subset_sum(s, a):
	dict = {}
	return subset_rec(0, s, a, dict)
	 subset_sum def subset_rec(i, s, a, dict):
	key = str(i) + '-' + str(s)
	ret = False
	if key in dict:
		ret = dict[key]
	elif s == 0:
		ret = True
	elif i >= len(a):
		ret =  False
	else:
		ret = subset_rec(i+1, s-a[i], a, dict) or subset_rec(i+1, s, a, dict)
	dict[key] = ret
	return ret	 def subset_rec(i, s, a, dict):
	key = str(i) + '-' + str(s)
	ret = False
	if key in dict:
		ret = dict[key]
	elif s == 0:
		ret = True
	elif i >= len(a):
		ret =  False
	else:
		ret = subset_rec(i+1, s-a[i], a, dict) or subset_rec(i+1, s, a, dict)
	dict[key] = ret
	return ret	 subset_rec a = list(map(int, input().split())) list(map(int, input().split())) a q = list(map(int, input().split())) list(map(int, input().split())) q n = int(input()) int(input()) n
def subset_sum(s, a):
	dict = {}
	return subset_rec(0, s, a, dict)
	
def subset_rec(i, s, a, dict):
	key = str(i) + '-' + str(s)
	ret = False
	if key in dict:
		ret = dict[key]
	elif s == 0:
		ret = True
	elif i >= len(a):
		ret =  False
	else:
		ret = subset_rec(i+1, s-a[i], a, dict) or subset_rec(i+1, s, a, dict)
	dict[key] = ret
	return ret	

n = int(input())
a = list(map(int, input().split()))
p = int(input())
q = list(map(int, input().split()))
for i in range(p):
	if subset_sum(q[i], a):
		print('yes')
	else:
		print('no')

