from itertools import combinations

n = int(input())
a = list(map(int, input().split()))
q = int(input())
m = map(int, input().split())

s = set()
for i in range(1, n):
    for j in combinations(a, i):
        s.add(sum(j))
for ans in m:
    print('yes' if ans in s else 'no') from itertools import combinations 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 = map(int, input().split()) m map(int, input().split()) map int input().split() ().split () input split s = set() s set() set for i in range(1, n):
    for j in combinations(a, i):
        s.add(sum(j)) i range(1, n) range 1 n for j in combinations(a, i):
        s.add(sum(j)) j combinations(a, i) combinations a i s.add(sum(j)) s.add s add sum(j) sum j for ans in m:
    print('yes' if ans in s else 'no') ans m print('yes' if ans in s else 'no') print 'yes' if ans in s else 'no' ans in s ans s 'yes' 'no' s = set() set() s q = int(input()) int(input()) q m = map(int, input().split()) map(int, input().split()) m n = int(input()) int(input()) n a = list(map(int, input().split())) list(map(int, input().split())) a
from itertools import combinations

n = int(input())
a = list(map(int, input().split()))
q = int(input())
m = map(int, input().split())

s = set()
for i in range(1, n):
    for j in combinations(a, i):
        s.add(sum(j))
for ans in m:
    print('yes' if ans in s else 'no')