from sys import stdin

input = stdin.readline

n = int(input())
A = list(map(int, input().split()))
q = int(input())
m = list(map(int, input().split()))

set_m = set([])

for i in range(2 ** n):
    tmp = 0
    for j in range(n):
        if (i >> j) & 1:
            tmp += A[j]

    set_m.add(tmp)

for i in m:
    if i in set_m:
        print("yes")
    else:
        print("no")
 from sys import stdin input = stdin.readline input stdin.readline stdin readline n = int(input()) n int(input()) int input() input A = list(map(int, input().split())) A list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split q = int(input()) q int(input()) int input() input m = list(map(int, input().split())) m list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split set_m = set([]) set_m set([]) set [] for i in range(2 ** n):
    tmp = 0
    for j in range(n):
        if (i >> j) & 1:
            tmp += A[j]

    set_m.add(tmp) i range(2 ** n) range 2 ** n 2 n tmp = 0 tmp 0 for j in range(n):
        if (i >> j) & 1:
            tmp += A[j]

     j range(n) range n if (i >> j) & 1:
            tmp += A[j]

     (i >> j) & 1 i >> j i j 1 tmp += A[j] tmp A[j] A j set_m.add(tmp) set_m.add set_m add tmp for i in m:
    if i in set_m:
        print("yes")
    else:
        print("no") i m if i in set_m:
        print("yes")
    else:
        print("no") i in set_m i set_m print("yes") print "yes" print("no") print "no" input = stdin.readline stdin.readline input A = list(map(int, input().split())) list(map(int, input().split())) A q = int(input()) int(input()) q m = list(map(int, input().split())) list(map(int, input().split())) m set_m = set([]) set([]) set_m tmp = 0 0 tmp n = int(input()) int(input()) n tmp += A[j] A[j] tmp
from sys import stdin

input = stdin.readline

n = int(input())
A = list(map(int, input().split()))
q = int(input())
m = list(map(int, input().split()))

set_m = set([])

for i in range(2 ** n):
    tmp = 0
    for j in range(n):
        if (i >> j) & 1:
            tmp += A[j]

    set_m.add(tmp)

for i in m:
    if i in set_m:
        print("yes")
    else:
        print("no")

