import sys
from collections import deque

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

n = I()
A = LI()
q = I()
m = LI()
ans = 0
partial_sum = set()
for i in range(2 ** n):
    bit = [i>>j&1 for j in range(n)]
    partial_sum.add(sum(A[k]*bit[k] for k in range(n)))
for x in m:
    print('yes' if x in partial_sum else 'no')
 import sys sys from collections import deque def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def S(): return sys.stdin.readline().rstrip() S def LS(): return list(sys.stdin.readline().rstrip().split()) LS n = I() n I() I A = LI() A LI() LI q = I() q I() I m = LI() m LI() LI ans = 0 ans 0 partial_sum = set() partial_sum set() set for i in range(2 ** n):
    bit = [i>>j&1 for j in range(n)]
    partial_sum.add(sum(A[k]*bit[k] for k in range(n))) 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)] partial_sum.add(sum(A[k]*bit[k] for k in range(n))) partial_sum.add partial_sum add sum(A[k]*bit[k] for k in range(n)) sum A[k]*bit[k] A[k] A k bit[k] bit k for x in m:
    print('yes' if x in partial_sum else 'no') x m print('yes' if x in partial_sum else 'no') print 'yes' if x in partial_sum else 'no' x in partial_sum x partial_sum 'yes' 'no' bit = [i>>j&1 for j in range(n)] [i>>j&1 for j in range(n)] bit def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI n = I() I() n A = LI() LI() A def LS(): return list(sys.stdin.readline().rstrip().split()) def LS(): return list(sys.stdin.readline().rstrip().split()) LS m = LI() LI() m ans = 0 0 ans def S(): return sys.stdin.readline().rstrip() def S(): return sys.stdin.readline().rstrip() S partial_sum = set() set() partial_sum q = I() I() q
import sys
from collections import deque

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

n = I()
A = LI()
q = I()
m = LI()
ans = 0
partial_sum = set()
for i in range(2 ** n):
    bit = [i>>j&1 for j in range(n)]
    partial_sum.add(sum(A[k]*bit[k] for k in range(n)))
for x in m:
    print('yes' if x in partial_sum else 'no')

