import sys

n = int(input())
A = [int(a) for a in input().split()]

q = int(input())
M = [int(m) for m in input().split()]

makable = set()

for i in range(2 ** n):
    total = 0

    for j in range(n):
        b = i % 2
        total += A[j] * b
        i //= 2

    makable.add(total)

# print(makable)

for m in M:
    if m in makable:
        print("yes")
    else:
        print("no") import sys sys n = int(input()) n int(input()) int input() input int(a) for a in input().split() for a in input().split() a input().split() ().split () input split for a in input().split() int(a) int a A = [int(a) for a in input().split()] A [int(a) for a in input().split()] q = int(input()) q int(input()) int input() input int(m) for m in input().split() for m in input().split() m input().split() ().split () input split for m in input().split() int(m) int m M = [int(m) for m in input().split()] M [int(m) for m in input().split()] makable = set() makable set() set for i in range(2 ** n):
    total = 0

    for j in range(n):
        b = i % 2
        total += A[j] * b
        i //= 2

    makable.add(total)

# print(makable) i range(2 ** n) range 2 ** n 2 n total = 0 total 0 for j in range(n):
        b = i % 2
        total += A[j] * b
        i //= 2

     j range(n) range n b = i % 2 b i % 2 i 2 total += A[j] * b total A[j] * b A[j] A j b i //= 2 i 2 makable.add(total) makable.add makable add total for m in M:
    if m in makable:
        print("yes")
    else:
        print("no") m M if m in makable:
        print("yes")
    else:
        print("no") m in makable m makable print("yes") print "yes" print("no") print "no" M = [int(m) for m in input().split()] [int(m) for m in input().split()] M makable = set() set() makable b = i % 2 i % 2 b i //= 2 2 i A = [int(a) for a in input().split()] [int(a) for a in input().split()] A total = 0 0 total n = int(input()) int(input()) n q = int(input()) int(input()) q total += A[j] * b A[j] * b total
import sys

n = int(input())
A = [int(a) for a in input().split()]

q = int(input())
M = [int(m) for m in input().split()]

makable = set()

for i in range(2 ** n):
    total = 0

    for j in range(n):
        b = i % 2
        total += A[j] * b
        i //= 2

    makable.add(total)

# print(makable)

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