
def solve(a, m):
	dict = {}
	return solve_(a, 0, m, dict)

def solve_(a, i, m, dict):
	res = False
	key = str(i) + '-' + str(m)
	if key in dict:
		res = dict[key]
	elif m == 0:
		res = True
	elif i >= len(a):
		res = False
	else:
		res1 = solve_(a, i + 1, m, dict)
		res2 = solve_(a, i + 1, m - a[i], dict)
		res = res1 or res2
	dict[key] = res
	return res

n = int(input())
a = list(map(int, input().split()))
q = int(input())
m = list(map(int, input().split()))
for i in range(q):
	if solve(a, m[i]):
		print('yes')
	else:
		print('no')
 def solve(a, m):
	dict = {}
	return solve_(a, 0, m, dict) solve dict = {} dict {} return solve_(a, 0, m, dict) solve_(a, 0, m, dict) solve_ a 0 m dict a a m m def solve_(a, i, m, dict):
	res = False
	key = str(i) + '-' + str(m)
	if key in dict:
		res = dict[key]
	elif m == 0:
		res = True
	elif i >= len(a):
		res = False
	else:
		res1 = solve_(a, i + 1, m, dict)
		res2 = solve_(a, i + 1, m - a[i], dict)
		res = res1 or res2
	dict[key] = res
	return res solve_ res = False res False key = str(i) + '-' + str(m) key str(i) + '-' + str(m) str(i) + '-' str(i) str i '-' str(m) str m if key in dict:
		res = dict[key]
	elif m == 0:
		res = True
	elif i >= len(a):
		res = False
	else:
		res1 = solve_(a, i + 1, m, dict)
		res2 = solve_(a, i + 1, m - a[i], dict)
		res = res1 or res2
	 key in dict key dict res = dict[key] res dict[key] dict key elif m == 0:
		res = True
	 m == 0 m 0 res = True res True elif i >= len(a):
		res = False
	 i >= len(a) i len(a) len a res = False res False res1 = solve_(a, i + 1, m, dict) res1 solve_(a, i + 1, m, dict) solve_ a i + 1 i 1 m dict res2 = solve_(a, i + 1, m - a[i], dict) res2 solve_(a, i + 1, m - a[i], dict) solve_ a i + 1 i 1 m - a[i] m a[i] a i dict res = res1 or res2 res res1 or res2 res1 res2 dict[key] = res dict[key] dict key res return res res a a i i m m 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 q = int(input()) q int(input()) int input() input m = list(map(int, input().split())) m list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split for i in range(q):
	if solve(a, m[i]):
		print('yes')
	else:
		print('no') i range(q) range q if solve(a, m[i]):
		print('yes')
	else:
		print('no') solve(a, m[i]) solve a m[i] m i print('yes') print 'yes' print('no') print 'no' def solve(a, m):
	dict = {}
	return solve_(a, 0, m, dict) def solve(a, m):
	dict = {}
	return solve_(a, 0, m, dict) solve n = int(input()) int(input()) n def solve_(a, i, m, dict):
	res = False
	key = str(i) + '-' + str(m)
	if key in dict:
		res = dict[key]
	elif m == 0:
		res = True
	elif i >= len(a):
		res = False
	else:
		res1 = solve_(a, i + 1, m, dict)
		res2 = solve_(a, i + 1, m - a[i], dict)
		res = res1 or res2
	dict[key] = res
	return res def solve_(a, i, m, dict):
	res = False
	key = str(i) + '-' + str(m)
	if key in dict:
		res = dict[key]
	elif m == 0:
		res = True
	elif i >= len(a):
		res = False
	else:
		res1 = solve_(a, i + 1, m, dict)
		res2 = solve_(a, i + 1, m - a[i], dict)
		res = res1 or res2
	dict[key] = res
	return res solve_ q = int(input()) int(input()) q m = list(map(int, input().split())) list(map(int, input().split())) m a = list(map(int, input().split())) list(map(int, input().split())) a

def solve(a, m):
	dict = {}
	return solve_(a, 0, m, dict)

def solve_(a, i, m, dict):
	res = False
	key = str(i) + '-' + str(m)
	if key in dict:
		res = dict[key]
	elif m == 0:
		res = True
	elif i >= len(a):
		res = False
	else:
		res1 = solve_(a, i + 1, m, dict)
		res2 = solve_(a, i + 1, m - a[i], dict)
		res = res1 or res2
	dict[key] = res
	return res

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

