n = int(input())
A = tuple(map(int, input().split()))
q = int(input())
M = tuple(map(int, input().split()))

sums = set()
from collections import deque
st = deque([[0, 0], [0, A[0]]])
while st:
    i, s = st.pop()
    i += 1
    if i == n:
        sums.add(s)
        continue
    st.append([i, s])
    st.append([i, s+A[i]])

for m in M:
    print('yes' if m in sums else 'no')
     n = int(input()) n int(input()) int input() input A = tuple(map(int, input().split())) A tuple(map(int, input().split())) tuple map(int, input().split()) map int input().split() ().split () input split q = int(input()) q int(input()) int input() input M = tuple(map(int, input().split())) M tuple(map(int, input().split())) tuple map(int, input().split()) map int input().split() ().split () input split sums = set() sums set() set from collections import deque st = deque([[0, 0], [0, A[0]]]) st deque([[0, 0], [0, A[0]]]) deque [[0, 0], [0, A[0]]] [0, 0] 0 0 [0, A[0]] 0 A[0] A 0 while st:
    i, s = st.pop()
    i += 1
    if i == n:
        sums.add(s)
        continue
    st.append([i, s])
    st.append([i, s+A[i]]) st i, s = st.pop() i st.pop() st.pop st pop s i += 1 i 1 if i == n:
        sums.add(s)
        continue
     i == n i n sums.add(s) sums.add sums add s continue st.append([i, s]) st.append st append [i, s] i s st.append([i, s+A[i]]) st.append st append [i, s+A[i]] i s+A[i] s A[i] A i for m in M:
    print('yes' if m in sums else 'no')
     m M print('yes' if m in sums else 'no') print 'yes' if m in sums else 'no' m in sums m sums 'yes' 'no' st = deque([[0, 0], [0, A[0]]]) deque([[0, 0], [0, A[0]]]) st i += 1 1 i M = tuple(map(int, input().split())) tuple(map(int, input().split())) M n = int(input()) int(input()) n s = st.pop() st.pop() s i, s = st.pop() st.pop() i A = tuple(map(int, input().split())) tuple(map(int, input().split())) A sums = set() set() sums q = int(input()) int(input()) q
n = int(input())
A = tuple(map(int, input().split()))
q = int(input())
M = tuple(map(int, input().split()))

sums = set()
from collections import deque
st = deque([[0, 0], [0, A[0]]])
while st:
    i, s = st.pop()
    i += 1
    if i == n:
        sums.add(s)
        continue
    st.append([i, s])
    st.append([i, s+A[i]])

for m in M:
    print('yes' if m in sums else 'no')
    
