import itertools
 
numA = int(input().rstrip())
listA = list(map(int,input().rstrip().split(" ")))
numQ = int(input().rstrip())
listQ = list(map(int,input().rstrip().split(" ")))
 
sumA = set([])
cnt = 0
 
 
for i in range(1,numA+1):
    tmpComb = list(itertools.combinations(listA, i))
    for nums in tmpComb:
        sumA.add(sum(nums))
 
 
for i in range(numQ):
    if listQ[i] in sumA:
        print("yes")
    else:
        print("no") import itertools itertools numA = int(input().rstrip()) numA int(input().rstrip()) int input().rstrip() ().rstrip () input rstrip listA = list(map(int,input().rstrip().split(" "))) listA list(map(int,input().rstrip().split(" "))) list map(int,input().rstrip().split(" ")) map int input().rstrip().split(" ") ().rstrip().split ().rstrip() ().rstrip () input rstrip split " " numQ = int(input().rstrip()) numQ int(input().rstrip()) int input().rstrip() ().rstrip () input rstrip listQ = list(map(int,input().rstrip().split(" "))) listQ list(map(int,input().rstrip().split(" "))) list map(int,input().rstrip().split(" ")) map int input().rstrip().split(" ") ().rstrip().split ().rstrip() ().rstrip () input rstrip split " " sumA = set([]) sumA set([]) set [] cnt = 0 cnt 0 for i in range(1,numA+1):
    tmpComb = list(itertools.combinations(listA, i))
    for nums in tmpComb:
        sumA.add(sum(nums))
 
  i range(1,numA+1) range 1 numA+1 numA 1 tmpComb = list(itertools.combinations(listA, i)) tmpComb list(itertools.combinations(listA, i)) list itertools.combinations(listA, i) itertools.combinations itertools combinations listA i for nums in tmpComb:
        sumA.add(sum(nums))
 
  nums tmpComb sumA.add(sum(nums)) sumA.add sumA add sum(nums) sum nums for i in range(numQ):
    if listQ[i] in sumA:
        print("yes")
    else:
        print("no") i range(numQ) range numQ if listQ[i] in sumA:
        print("yes")
    else:
        print("no") listQ[i] in sumA listQ[i] listQ i sumA print("yes") print "yes" print("no") print "no" listQ = list(map(int,input().rstrip().split(" "))) list(map(int,input().rstrip().split(" "))) listQ cnt = 0 0 cnt tmpComb = list(itertools.combinations(listA, i)) list(itertools.combinations(listA, i)) tmpComb numA = int(input().rstrip()) int(input().rstrip()) numA numQ = int(input().rstrip()) int(input().rstrip()) numQ sumA = set([]) set([]) sumA listA = list(map(int,input().rstrip().split(" "))) list(map(int,input().rstrip().split(" "))) listA
import itertools
 
numA = int(input().rstrip())
listA = list(map(int,input().rstrip().split(" ")))
numQ = int(input().rstrip())
listQ = list(map(int,input().rstrip().split(" ")))
 
sumA = set([])
cnt = 0
 
 
for i in range(1,numA+1):
    tmpComb = list(itertools.combinations(listA, i))
    for nums in tmpComb:
        sumA.add(sum(nums))
 
 
for i in range(numQ):
    if listQ[i] in sumA:
        print("yes")
    else:
        print("no")