import sys
input = sys.stdin.readline

n = int(input())
A = [int(i) for i in input().strip().split()]
q = int(input())
M = [int(i) for i in input().strip().split()]

comb = set()

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

for m in M:
    if m in comb:
        print("yes")
    else:
        print("no")
 import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline n = int(input()) n int(input()) int input() input int(i) for i in input().strip().split() for i in input().strip().split() i input().strip().split() ().strip().split ().strip() ().strip () input strip split for i in input().strip().split() int(i) int i A = [int(i) for i in input().strip().split()] A [int(i) for i in input().strip().split()] q = int(input()) q int(input()) int input() input int(i) for i in input().strip().split() for i in input().strip().split() i input().strip().split() ().strip().split ().strip() ().strip () input strip split for i in input().strip().split() int(i) int i M = [int(i) for i in input().strip().split()] M [int(i) for i in input().strip().split()] comb = set() comb set() set for i in range(2 ** n):
    _tmp = 0
    for j in range(n):
        if (i >> j) & 1:
            _tmp += A[j]
    comb.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 comb.add(_tmp) comb.add comb add _tmp for m in M:
    if m in comb:
        print("yes")
    else:
        print("no") m M if m in comb:
        print("yes")
    else:
        print("no") m in comb m comb print("yes") print "yes" print("no") print "no" q = int(input()) int(input()) q input = sys.stdin.readline sys.stdin.readline input _tmp += A[j] A[j] _tmp A = [int(i) for i in input().strip().split()] [int(i) for i in input().strip().split()] A _tmp = 0 0 _tmp M = [int(i) for i in input().strip().split()] [int(i) for i in input().strip().split()] M n = int(input()) int(input()) n comb = set() set() comb
import sys
input = sys.stdin.readline

n = int(input())
A = [int(i) for i in input().strip().split()]
q = int(input())
M = [int(i) for i in input().strip().split()]

comb = set()

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

for m in M:
    if m in comb:
        print("yes")
    else:
        print("no")

