
import itertools

n=int(input())
list1=list(map(int,input().split()))

q=int(input())
list2=list(map(int,input().split()))

sum1=set()

for i in range(1,n+1):
	x=list(itertools.combinations(list1,i))
	for j in x:
		sum1.add(sum(j))
		
		
for i in list2:
	if i in sum1:
		print("yes")
	else:
		print("no") import itertools itertools n=int(input()) n int(input()) int input() input list1=list(map(int,input().split())) list1 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 list2=list(map(int,input().split())) list2 list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split sum1=set() sum1 set() set for i in range(1,n+1):
	x=list(itertools.combinations(list1,i))
	for j in x:
		sum1.add(sum(j))
		
		 i range(1,n+1) range 1 n+1 n 1 x=list(itertools.combinations(list1,i)) x list(itertools.combinations(list1,i)) list itertools.combinations(list1,i) itertools.combinations itertools combinations list1 i for j in x:
		sum1.add(sum(j))
		
		 j x sum1.add(sum(j)) sum1.add sum1 add sum(j) sum j for i in list2:
	if i in sum1:
		print("yes")
	else:
		print("no") i list2 if i in sum1:
		print("yes")
	else:
		print("no") i in sum1 i sum1 print("yes") print "yes" print("no") print "no" x=list(itertools.combinations(list1,i)) list(itertools.combinations(list1,i)) x sum1=set() set() sum1 list1=list(map(int,input().split())) list(map(int,input().split())) list1 q=int(input()) int(input()) q list2=list(map(int,input().split())) list(map(int,input().split())) list2 n=int(input()) int(input()) n

import itertools

n=int(input())
list1=list(map(int,input().split()))

q=int(input())
list2=list(map(int,input().split()))

sum1=set()

for i in range(1,n+1):
	x=list(itertools.combinations(list1,i))
	for j in x:
		sum1.add(sum(j))
		
		
for i in list2:
	if i in sum1:
		print("yes")
	else:
		print("no")
