from itertools import chain, combinations

def power_set(x):
	return chain.from_iterable(combinations(x, r) for r in range(len(x)+1))

def main():
	n = int(input())
	A = input()
	#print(n)
	A = list(map(int, A.split()))
	q = int(input())
	m = input()
	ms = list(map(int, m.split()))
	powerset = power_set(A)
	sum_set = [sum(s) for s in powerset if len(s)!=0]
	
	for m in ms:
		if m in sum_set:
			print('yes')
		else:
			print('no')

if __name__ == '__main__':
	main() from itertools import chain, combinations def power_set(x):
	return chain.from_iterable(combinations(x, r) for r in range(len(x)+1)) power_set return chain.from_iterable(combinations(x, r) for r in range(len(x)+1)) chain.from_iterable(combinations(x, r) for r in range(len(x)+1)) chain.from_iterable chain from_iterable combinations(x, r) combinations x r x x def main():
	n = int(input())
	A = input()
	#print(n)
	A = list(map(int, A.split()))
	q = int(input())
	m = input()
	ms = list(map(int, m.split()))
	powerset = power_set(A)
	sum_set = [sum(s) for s in powerset if len(s)!=0]
	
	for m in ms:
		if m in sum_set:
			print('yes')
		else:
			print('no') main n = int(input()) n int(input()) int input() input A = input() A input() input A = list(map(int, A.split())) A list(map(int, A.split())) list map(int, A.split()) map int A.split() A.split A split q = int(input()) q int(input()) int input() input m = input() m input() input ms = list(map(int, m.split())) ms list(map(int, m.split())) list map(int, m.split()) map int m.split() m.split m split powerset = power_set(A) powerset power_set(A) power_set A sum(s) for s in powerset if len(s)!=0 for s in powerset if len(s)!=0 s powerset len(s)!=0 len(s) len s 0 if len(s)!=0 sum(s) sum s sum_set = [sum(s) for s in powerset if len(s)!=0] sum_set [sum(s) for s in powerset if len(s)!=0] for m in ms:
		if m in sum_set:
			print('yes')
		else:
			print('no') m ms if m in sum_set:
			print('yes')
		else:
			print('no') m in sum_set m sum_set print('yes') print 'yes' print('no') print 'no' if __name__ == '__main__':
	main() __name__ == '__main__' __name__ '__main__' main() main def main():
	n = int(input())
	A = input()
	#print(n)
	A = list(map(int, A.split()))
	q = int(input())
	m = input()
	ms = list(map(int, m.split()))
	powerset = power_set(A)
	sum_set = [sum(s) for s in powerset if len(s)!=0]
	
	for m in ms:
		if m in sum_set:
			print('yes')
		else:
			print('no') def main():
	n = int(input())
	A = input()
	#print(n)
	A = list(map(int, A.split()))
	q = int(input())
	m = input()
	ms = list(map(int, m.split()))
	powerset = power_set(A)
	sum_set = [sum(s) for s in powerset if len(s)!=0]
	
	for m in ms:
		if m in sum_set:
			print('yes')
		else:
			print('no') main def power_set(x):
	return chain.from_iterable(combinations(x, r) for r in range(len(x)+1)) def power_set(x):
	return chain.from_iterable(combinations(x, r) for r in range(len(x)+1)) power_set
from itertools import chain, combinations

def power_set(x):
	return chain.from_iterable(combinations(x, r) for r in range(len(x)+1))

def main():
	n = int(input())
	A = input()
	#print(n)
	A = list(map(int, A.split()))
	q = int(input())
	m = input()
	ms = list(map(int, m.split()))
	powerset = power_set(A)
	sum_set = [sum(s) for s in powerset if len(s)!=0]
	
	for m in ms:
		if m in sum_set:
			print('yes')
		else:
			print('no')

if __name__ == '__main__':
	main()