from itertools import chain, combinations



def power_set(x):

	return chain.from_iterable(combinations(x, r) for r in range(len(x)+1))



def main():

	n = int(eval(input()))

	A = eval(input())

	#print(n)

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

	q = int(eval(input()))

	m = eval(input())

	ms = list(map(int, m.split()))

	powerset = power_set(A)

	sum_set = [sum(s) for s in powerset if len(s)!=0]

	

	for m in ms:

		if m in sum_set:

			print('yes')

		else:

			print('no')



if __name__ == '__main__':

	main()
def power_set(A, s):

	if len(A) == 0:

		return {s}

	else:

		return power_set(A[1:], s) | power_set(A[1:], s+A[0])



def main():

	n = int(eval(input()))

	A = eval(input())

	#print(n)

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

	q = int(eval(input()))

	m = eval(input())

	ms = list(map(int, m.split()))

	powerset = power_set(A, 0)

	

	for m in ms:

		if m in powerset:

			print('yes')

		else:

			print('no')



if __name__ == '__main__':

	main()
from itertools import chain, combinations


def power_set(x):
    return chain.from_iterable(combinations(x, r) for r in range(len(x) + 1))


def main():
    n = int(eval(input()))
    A = eval(input())
    # print(n)
    A = list(map(int, A.split()))
    q = int(eval(input()))
    m = eval(input())
    ms = list(map(int, m.split()))
    powerset = power_set(A)
    sum_set = [sum(s) for s in powerset if len(s) != 0]
    for m in ms:
        if m in sum_set:
            print("yes")
        else:
            print("no")


if __name__ == "__main__":
    main()

def power_set(A, s):
    if len(A) == 0:
        return {s}
    else:
        return power_set(A[1:], s) | power_set(A[1:], s + A[0])


def main():
    n = int(eval(input()))
    A = eval(input())
    # print(n)
    A = list(map(int, A.split()))
    q = int(eval(input()))
    m = eval(input())
    ms = list(map(int, m.split()))
    powerset = power_set(A, 0)
    for m in ms:
        if m in powerset:
            print("yes")
        else:
            print("no")


if __name__ == "__main__":
    main()

-from itertools import chain, combinations - - -def power_set(x): -    return chain.from_iterable(combinations(x, r) for r in range(len(x) + 1)) +def power_set(A, s): +    if len(A) == 0: +        return {s} +    else: +        return power_set(A[1:], s) | power_set(A[1:], s + A[0]) -    powerset = power_set(A) -    sum_set = [sum(s) for s in powerset if len(s) != 0] +    powerset = power_set(A, 0) -        if m in sum_set: +        if m in powerset: