# ALDS_5_A - 総当たり　
import sys

n = int(input())
A = list(map(int, sys.stdin.readline().strip().split()))
q = int(input())
m = list(map(int, sys.stdin.readline().strip().split()))

sum_set = set()

for i in range(2 ** n):
    bit = [(i >> j) & 1 for j in range(n)]
    combined = [x * y for (x, y) in zip(A, bit)]
    sum_set.add(sum(combined))

for target in m:
    if target in sum_set:
        print('yes')
    else:
        print('no')
 import sys sys n = int(input()) n int(input()) int input() input A = list(map(int, sys.stdin.readline().strip().split())) A list(map(int, sys.stdin.readline().strip().split())) list map(int, sys.stdin.readline().strip().split()) map int sys.stdin.readline().strip().split() sys.stdin.readline().strip().split sys.stdin.readline().strip() sys.stdin.readline().strip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline strip split q = int(input()) q int(input()) int input() input m = list(map(int, sys.stdin.readline().strip().split())) m list(map(int, sys.stdin.readline().strip().split())) list map(int, sys.stdin.readline().strip().split()) map int sys.stdin.readline().strip().split() sys.stdin.readline().strip().split sys.stdin.readline().strip() sys.stdin.readline().strip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline strip split sum_set = set() sum_set set() set for i in range(2 ** n):
    bit = [(i >> j) & 1 for j in range(n)]
    combined = [x * y for (x, y) in zip(A, bit)]
    sum_set.add(sum(combined)) i range(2 ** n) range 2 ** n 2 n (i >> j) & 1 for j in range(n) for j in range(n) j range(n) range n for j in range(n) (i >> j) & 1 i >> j i j 1 bit = [(i >> j) & 1 for j in range(n)] bit [(i >> j) & 1 for j in range(n)] x * y for (x, y) in zip(A, bit) for (x, y) in zip(A, bit) (x, y) x y zip(A, bit) zip A bit for (x, y) in zip(A, bit) x * y x y combined = [x * y for (x, y) in zip(A, bit)] combined [x * y for (x, y) in zip(A, bit)] sum_set.add(sum(combined)) sum_set.add sum_set add sum(combined) sum combined for target in m:
    if target in sum_set:
        print('yes')
    else:
        print('no') target m if target in sum_set:
        print('yes')
    else:
        print('no') target in sum_set target sum_set print('yes') print 'yes' print('no') print 'no' sum_set = set() set() sum_set m = list(map(int, sys.stdin.readline().strip().split())) list(map(int, sys.stdin.readline().strip().split())) m A = list(map(int, sys.stdin.readline().strip().split())) list(map(int, sys.stdin.readline().strip().split())) A q = int(input()) int(input()) q combined = [x * y for (x, y) in zip(A, bit)] [x * y for (x, y) in zip(A, bit)] combined bit = [(i >> j) & 1 for j in range(n)] [(i >> j) & 1 for j in range(n)] bit n = int(input()) int(input()) n
# ALDS_5_A - 総当たり　
import sys

n = int(input())
A = list(map(int, sys.stdin.readline().strip().split()))
q = int(input())
m = list(map(int, sys.stdin.readline().strip().split()))

sum_set = set()

for i in range(2 ** n):
    bit = [(i >> j) & 1 for j in range(n)]
    combined = [x * y for (x, y) in zip(A, bit)]
    sum_set.add(sum(combined))

for target in m:
    if target in sum_set:
        print('yes')
    else:
        print('no')

