import itertools as itl

n = int(input())
A = list(map(int, input().split()))
q = int(input())
M = list(map(int, input().split()))
S = []

for i in range(n):
    cmb = list(itl.combinations(A, i+1))
    for j in cmb:
        S.append(sum(j))

for m in M:
    flg = False
    for s in S:
        if s == m:
            flg = True
            break
    if flg:
        print("yes")
    else:
        print("no")
 import itertools as itl itertools 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 S = [] S [] for i in range(n):
    cmb = list(itl.combinations(A, i+1))
    for j in cmb:
        S.append(sum(j)) i range(n) range n cmb = list(itl.combinations(A, i+1)) cmb list(itl.combinations(A, i+1)) list itl.combinations(A, i+1) itl.combinations itl combinations A i+1 i 1 for j in cmb:
        S.append(sum(j)) j cmb S.append(sum(j)) S.append S append sum(j) sum j for m in M:
    flg = False
    for s in S:
        if s == m:
            flg = True
            break
    if flg:
        print("yes")
    else:
        print("no") m M flg = False flg False for s in S:
        if s == m:
            flg = True
            break
     s S if s == m:
            flg = True
            break
     s == m s m flg = True flg True break if flg:
        print("yes")
    else:
        print("no") flg print("yes") print "yes" print("no") print "no" S = [] [] S M = list(map(int, input().split())) list(map(int, input().split())) M flg = True True flg flg = False False flg cmb = list(itl.combinations(A, i+1)) list(itl.combinations(A, i+1)) cmb q = int(input()) int(input()) q n = int(input()) int(input()) n A = list(map(int, input().split())) list(map(int, input().split())) A
import itertools as itl

n = int(input())
A = list(map(int, input().split()))
q = int(input())
M = list(map(int, input().split()))
S = []

for i in range(n):
    cmb = list(itl.combinations(A, i+1))
    for j in cmb:
        S.append(sum(j))

for m in M:
    flg = False
    for s in S:
        if s == m:
            flg = True
            break
    if flg:
        print("yes")
    else:
        print("no")

