import re
from itertools import product
import itertools

q1 = int(input())
q2 = input()
q3 = int(input())
q4 = input()

S = re.split(r' ',q2)
S=list(map(int, S))

T = re.split(r' ',q4)
T=list(map(int, T))

S_len = len(S)
T_len = len(T)

array = []
for j in range(q1+1):
    x = list(itertools.combinations(S, j))
    for k in range(len(x)):
        y = sum(x[k])
        array.append(y)

for i in range(T_len):
    if(T[i] in array):
        print("yes")
    else:
        print("no") import re re from itertools import product import itertools itertools q1 = int(input()) q1 int(input()) int input() input q2 = input() q2 input() input q3 = int(input()) q3 int(input()) int input() input q4 = input() q4 input() input S = re.split(r' ',q2) S re.split(r' ',q2) re.split re split r' ' q2 S=list(map(int, S)) S list(map(int, S)) list map(int, S) map int S T = re.split(r' ',q4) T re.split(r' ',q4) re.split re split r' ' q4 T=list(map(int, T)) T list(map(int, T)) list map(int, T) map int T S_len = len(S) S_len len(S) len S T_len = len(T) T_len len(T) len T array = [] array [] for j in range(q1+1):
    x = list(itertools.combinations(S, j))
    for k in range(len(x)):
        y = sum(x[k])
        array.append(y) j range(q1+1) range q1+1 q1 1 x = list(itertools.combinations(S, j)) x list(itertools.combinations(S, j)) list itertools.combinations(S, j) itertools.combinations itertools combinations S j for k in range(len(x)):
        y = sum(x[k])
        array.append(y) k range(len(x)) range len(x) len x y = sum(x[k]) y sum(x[k]) sum x[k] x k array.append(y) array.append array append y for i in range(T_len):
    if(T[i] in array):
        print("yes")
    else:
        print("no") i range(T_len) range T_len if(T[i] in array):
        print("yes")
    else:
        print("no") T[i] in array T[i] T i array print("yes") print "yes" print("no") print "no" x = list(itertools.combinations(S, j)) list(itertools.combinations(S, j)) x array = [] [] array S = re.split(r' ',q2) re.split(r' ',q2) S S_len = len(S) len(S) S_len q3 = int(input()) int(input()) q3 T = re.split(r' ',q4) re.split(r' ',q4) T T=list(map(int, T)) list(map(int, T)) T q2 = input() input() q2 q4 = input() input() q4 S=list(map(int, S)) list(map(int, S)) S q1 = int(input()) int(input()) q1 y = sum(x[k]) sum(x[k]) y T_len = len(T) len(T) T_len
import re
from itertools import product
import itertools

q1 = int(input())
q2 = input()
q3 = int(input())
q4 = input()

S = re.split(r' ',q2)
S=list(map(int, S))

T = re.split(r' ',q4)
T=list(map(int, T))

S_len = len(S)
T_len = len(T)

array = []
for j in range(q1+1):
    x = list(itertools.combinations(S, j))
    for k in range(len(x)):
        y = sum(x[k])
        array.append(y)

for i in range(T_len):
    if(T[i] in array):
        print("yes")
    else:
        print("no")
