def power_set(A, s):
	if len(A) == 0:
		return {s}
	else:
		return power_set(A[1:], s) | power_set(A[1:], s+A[0])

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, 0)
	
	for m in ms:
		if m in powerset:
			print('yes')
		else:
			print('no')

if __name__ == '__main__':
	main() def power_set(A, s):
	if len(A) == 0:
		return {s}
	else:
		return power_set(A[1:], s) | power_set(A[1:], s+A[0]) power_set if len(A) == 0:
		return {s}
	else:
		return power_set(A[1:], s) | power_set(A[1:], s+A[0]) len(A) == 0 len(A) len A 0 return {s} {s} return power_set(A[1:], s) | power_set(A[1:], s+A[0]) power_set(A[1:], s) | power_set(A[1:], s+A[0]) power_set(A[1:], s) power_set A[1:] A 1: 1 s power_set(A[1:], s+A[0]) power_set A[1:] A 1: 1 s+A[0] s A[0] A 0 A A s s 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, 0)
	
	for m in ms:
		if m in powerset:
			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, 0) powerset power_set(A, 0) power_set A 0 for m in ms:
		if m in powerset:
			print('yes')
		else:
			print('no') m ms if m in powerset:
			print('yes')
		else:
			print('no') m in powerset m powerset 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, 0)
	
	for m in ms:
		if m in powerset:
			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, 0)
	
	for m in ms:
		if m in powerset:
			print('yes')
		else:
			print('no') main def power_set(A, s):
	if len(A) == 0:
		return {s}
	else:
		return power_set(A[1:], s) | power_set(A[1:], s+A[0]) def power_set(A, s):
	if len(A) == 0:
		return {s}
	else:
		return power_set(A[1:], s) | power_set(A[1:], s+A[0]) power_set
def power_set(A, s):
	if len(A) == 0:
		return {s}
	else:
		return power_set(A[1:], s) | power_set(A[1:], s+A[0])

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, 0)
	
	for m in ms:
		if m in powerset:
			print('yes')
		else:
			print('no')

if __name__ == '__main__':
	main()