import sys
import itertools

def can_be_composed(n, min_list, max_list, m, A):
	for i in range(1, n + 1):
		if m < min_list[i - 1]:
			continue
		if m > max_list[i - 1]:
			continue

		combination_list = list(itertools.combinations(A, i))
		for l in combination_list:
			if m == sum(l):
				return True

	return False

#fin = open("test.txt", "r")
fin = sys.stdin

n = int(fin.readline())
A = list(map(int, fin.readline().split()))
A.sort()
q = int(fin.readline())
m_list = list(map(int, fin.readline().split()))

min_list = [0]
min_list[0] += A[0]
for i in range(1, n):
	min_list.append(min_list[i - 1] + A[i])

max_list = [0]
max_list[0] += A[n - 1]
for i in range(1, n):
	max_list.append(max_list[i - 1] + A[n - i - 1])

for m in m_list:
	if can_be_composed(n, min_list, max_list, m, A):
		print("yes")
	else:
		print("no") import sys sys import itertools itertools def can_be_composed(n, min_list, max_list, m, A):
	for i in range(1, n + 1):
		if m < min_list[i - 1]:
			continue
		if m > max_list[i - 1]:
			continue

		combination_list = list(itertools.combinations(A, i))
		for l in combination_list:
			if m == sum(l):
				return True

	return False

#fin = open("test.txt", "r") can_be_composed for i in range(1, n + 1):
		if m < min_list[i - 1]:
			continue
		if m > max_list[i - 1]:
			continue

		combination_list = list(itertools.combinations(A, i))
		for l in combination_list:
			if m == sum(l):
				return True

	 i range(1, n + 1) range 1 n + 1 n 1 if m < min_list[i - 1]:
			continue
		 m < min_list[i - 1] m min_list[i - 1] min_list i - 1 i 1 continue if m > max_list[i - 1]:
			continue

		 m > max_list[i - 1] m max_list[i - 1] max_list i - 1 i 1 continue combination_list = list(itertools.combinations(A, i)) combination_list list(itertools.combinations(A, i)) list itertools.combinations(A, i) itertools.combinations itertools combinations A i for l in combination_list:
			if m == sum(l):
				return True

	 l combination_list if m == sum(l):
				return True

	 m == sum(l) m sum(l) sum l return True True return False False n n min_list min_list max_list max_list m m A A fin = sys.stdin fin sys.stdin sys stdin n = int(fin.readline()) n int(fin.readline()) int fin.readline() fin.readline fin readline A = list(map(int, fin.readline().split())) A list(map(int, fin.readline().split())) list map(int, fin.readline().split()) map int fin.readline().split() fin.readline().split fin.readline() fin.readline fin readline split A.sort() A.sort A sort q = int(fin.readline()) q int(fin.readline()) int fin.readline() fin.readline fin readline m_list = list(map(int, fin.readline().split())) m_list list(map(int, fin.readline().split())) list map(int, fin.readline().split()) map int fin.readline().split() fin.readline().split fin.readline() fin.readline fin readline split min_list = [0] min_list [0] 0 min_list[0] += A[0] min_list[0] min_list 0 A[0] A 0 for i in range(1, n):
	min_list.append(min_list[i - 1] + A[i]) i range(1, n) range 1 n min_list.append(min_list[i - 1] + A[i]) min_list.append min_list append min_list[i - 1] + A[i] min_list[i - 1] min_list i - 1 i 1 A[i] A i max_list = [0] max_list [0] 0 max_list[0] += A[n - 1] max_list[0] max_list 0 A[n - 1] A n - 1 n 1 for i in range(1, n):
	max_list.append(max_list[i - 1] + A[n - i - 1]) i range(1, n) range 1 n max_list.append(max_list[i - 1] + A[n - i - 1]) max_list.append max_list append max_list[i - 1] + A[n - i - 1] max_list[i - 1] max_list i - 1 i 1 A[n - i - 1] A n - i - 1 n - i n i 1 for m in m_list:
	if can_be_composed(n, min_list, max_list, m, A):
		print("yes")
	else:
		print("no") m m_list if can_be_composed(n, min_list, max_list, m, A):
		print("yes")
	else:
		print("no") can_be_composed(n, min_list, max_list, m, A) can_be_composed n min_list max_list m A print("yes") print "yes" print("no") print "no" A = list(map(int, fin.readline().split())) list(map(int, fin.readline().split())) A def can_be_composed(n, min_list, max_list, m, A):
	for i in range(1, n + 1):
		if m < min_list[i - 1]:
			continue
		if m > max_list[i - 1]:
			continue

		combination_list = list(itertools.combinations(A, i))
		for l in combination_list:
			if m == sum(l):
				return True

	return False

#fin = open("test.txt", "r") def can_be_composed(n, min_list, max_list, m, A):
	for i in range(1, n + 1):
		if m < min_list[i - 1]:
			continue
		if m > max_list[i - 1]:
			continue

		combination_list = list(itertools.combinations(A, i))
		for l in combination_list:
			if m == sum(l):
				return True

	return False

#fin = open("test.txt", "r") can_be_composed min_list = [0] [0] min_list fin = sys.stdin sys.stdin fin n = int(fin.readline()) int(fin.readline()) n q = int(fin.readline()) int(fin.readline()) q m_list = list(map(int, fin.readline().split())) list(map(int, fin.readline().split())) m_list max_list = [0] [0] max_list
import sys
import itertools

def can_be_composed(n, min_list, max_list, m, A):
	for i in range(1, n + 1):
		if m < min_list[i - 1]:
			continue
		if m > max_list[i - 1]:
			continue

		combination_list = list(itertools.combinations(A, i))
		for l in combination_list:
			if m == sum(l):
				return True

	return False

#fin = open("test.txt", "r")
fin = sys.stdin

n = int(fin.readline())
A = list(map(int, fin.readline().split()))
A.sort()
q = int(fin.readline())
m_list = list(map(int, fin.readline().split()))

min_list = [0]
min_list[0] += A[0]
for i in range(1, n):
	min_list.append(min_list[i - 1] + A[i])

max_list = [0]
max_list[0] += A[n - 1]
for i in range(1, n):
	max_list.append(max_list[i - 1] + A[n - i - 1])

for m in m_list:
	if can_be_composed(n, min_list, max_list, m, A):
		print("yes")
	else:
		print("no")