from itertools import combinations

n, a, q, ms, cache = int(input()), list(map(int, input().split())), input(), map(int, input().split()), {}

l = set(sum(t) for i in range(n) for t in combinations(a, i + 1))

for m in ms:
    print('yes' if m in l else 'no') from itertools import combinations n, a, q, ms, cache = int(input()), list(map(int, input().split())), input(), map(int, input().split()), {} n int(input()) int input() input a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split q input() input ms map(int, input().split()) map int input().split() ().split () input split cache {} l = set(sum(t) for i in range(n) for t in combinations(a, i + 1)) l set(sum(t) for i in range(n) for t in combinations(a, i + 1)) set sum(t) sum t for m in ms:
    print('yes' if m in l else 'no') m ms print('yes' if m in l else 'no') print 'yes' if m in l else 'no' m in l m l 'yes' 'no' a, q, ms, cache = int(input()), list(map(int, input().split())), input(), map(int, input().split()), {} list(map(int, input().split())) a ms, cache = int(input()), list(map(int, input().split())), input(), map(int, input().split()), {} map(int, input().split()) ms q, ms, cache = int(input()), list(map(int, input().split())), input(), map(int, input().split()), {} input() q cache = int(input()), list(map(int, input().split())), input(), map(int, input().split()), {} {} cache l = set(sum(t) for i in range(n) for t in combinations(a, i + 1)) set(sum(t) for i in range(n) for t in combinations(a, i + 1)) l n, a, q, ms, cache = int(input()), list(map(int, input().split())), input(), map(int, input().split()), {} int(input()) n
from itertools import combinations

n, a, q, ms, cache = int(input()), list(map(int, input().split())), input(), map(int, input().split()), {}

l = set(sum(t) for i in range(n) for t in combinations(a, i + 1))

for m in ms:
    print('yes' if m in l else 'no')