def solve(Mi,i):

	if Mi == 0: return True

	if i < n and min(A[i:]) <= Mi <= sum(A[i:]):

		r1 = solve(Mi-A[i],i+1)

		r2 = solve(Mi,i+1)

		if r1: return r1

		if r2: return r2

n = eval(input())

A = list(map(int,input().split()))

q = eval(input())

M = list(map(int,input().split()))

for Mi in M:

	print("yes" if solve(Mi,0) else "no")
def solve(Mi,i):

	if Mi == 0: return True

	if i < n and min(A[i:]) <= Mi <= sum(A[i:]):

		r1 = solve(Mi-A[i],i+1)

		if r1: return r1

		r2 = solve(Mi,i+1)

		if r2: return r2

n = eval(input())

A = list(map(int,input().split()))

q = eval(input())

M = list(map(int,input().split()))

for Mi in M:

	print("yes" if solve(Mi,0) else "no")
def solve(Mi, i):
    if Mi == 0:
        return True
    if i < n and min(A[i:]) <= Mi <= sum(A[i:]):
        r1 = solve(Mi - A[i], i + 1)
        r2 = solve(Mi, i + 1)
        if r1:
            return r1
        if r2:
            return r2


n = eval(input())
A = list(map(int, input().split()))
q = eval(input())
M = list(map(int, input().split()))
for Mi in M:
    print("yes" if solve(Mi, 0) else "no")

def solve(Mi, i):
    if Mi == 0:
        return True
    if i < n and min(A[i:]) <= Mi <= sum(A[i:]):
        r1 = solve(Mi - A[i], i + 1)
        if r1:
            return r1
        r2 = solve(Mi, i + 1)
        if r2:
            return r2


n = eval(input())
A = list(map(int, input().split()))
q = eval(input())
M = list(map(int, input().split()))
for Mi in M:
    print("yes" if solve(Mi, 0) else "no")

-        r2 = solve(Mi, i + 1) +        r2 = solve(Mi, i + 1)