from itertools import combinations

n = int(input())
a_array = [int(x) for x in input().split()]
q = int(input())
m_array = [int(x) for x in input().split()]

array = []
for j in range(n + 1):
    x = combinations(a_array, j)
    for y in x:
        array.append(sum(y))

for m in m_array:
    print("yes" if m in array else "no") from itertools import combinations n = int(input()) n int(input()) int input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x a_array = [int(x) for x in input().split()] a_array [int(x) for x in input().split()] q = int(input()) q int(input()) int input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x m_array = [int(x) for x in input().split()] m_array [int(x) for x in input().split()] array = [] array [] for j in range(n + 1):
    x = combinations(a_array, j)
    for y in x:
        array.append(sum(y)) j range(n + 1) range n + 1 n 1 x = combinations(a_array, j) x combinations(a_array, j) combinations a_array j for y in x:
        array.append(sum(y)) y x array.append(sum(y)) array.append array append sum(y) sum y for m in m_array:
    print("yes" if m in array else "no") m m_array print("yes" if m in array else "no") print "yes" if m in array else "no" m in array m array "yes" "no" q = int(input()) int(input()) q array = [] [] array n = int(input()) int(input()) n a_array = [int(x) for x in input().split()] [int(x) for x in input().split()] a_array x = combinations(a_array, j) combinations(a_array, j) x m_array = [int(x) for x in input().split()] [int(x) for x in input().split()] m_array
from itertools import combinations

n = int(input())
a_array = [int(x) for x in input().split()]
q = int(input())
m_array = [int(x) for x in input().split()]

array = []
for j in range(n + 1):
    x = combinations(a_array, j)
    for y in x:
        array.append(sum(y))

for m in m_array:
    print("yes" if m in array else "no")
