import sys, os, math \
    # , bisect, itertools, collections, heapq, queue

# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
# from decimal import Decimal
# from collections import defaultdict, deque
# import copy

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    A = il()
    Q = ii()
    M = il()

    num_set = set()
    for i in range(1 << N):
        num = 0
        for n in range(N):
            if i >> n & 1:
                num += A[n]
        num_set.add(num)

    for m in M:
        if m in num_set:
            print('yes')
        else:
            print('no')


if __name__ == '__main__':
    main()
 import sys, os, math sys os math sys.setrecursionlimit(10000000) sys.setrecursionlimit sys setrecursionlimit 10000000 ii = lambda: int(sys.stdin.buffer.readline().rstrip()) ii lambda: int(sys.stdin.buffer.readline().rstrip()) int(sys.stdin.buffer.readline().rstrip()) int sys.stdin.buffer.readline().rstrip() sys.stdin.buffer.readline().rstrip sys.stdin.buffer.readline() sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline rstrip il = lambda: list(map(int, sys.stdin.buffer.readline().split())) il lambda: list(map(int, sys.stdin.buffer.readline().split())) list(map(int, sys.stdin.buffer.readline().split())) list map(int, sys.stdin.buffer.readline().split()) map int sys.stdin.buffer.readline().split() sys.stdin.buffer.readline().split sys.stdin.buffer.readline() sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline split fl = lambda: list(map(float, sys.stdin.buffer.readline().split())) fl lambda: list(map(float, sys.stdin.buffer.readline().split())) list(map(float, sys.stdin.buffer.readline().split())) list map(float, sys.stdin.buffer.readline().split()) map float sys.stdin.buffer.readline().split() sys.stdin.buffer.readline().split sys.stdin.buffer.readline() sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline split int(sys.stdin.buffer.readline().rstrip()) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) int(sys.stdin.buffer.readline().rstrip()) int sys.stdin.buffer.readline().rstrip() sys.stdin.buffer.readline().rstrip sys.stdin.buffer.readline() sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline rstrip iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)] iln lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)] [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)] n iss = lambda: sys.stdin.buffer.readline().decode().rstrip() iss lambda: sys.stdin.buffer.readline().decode().rstrip() sys.stdin.buffer.readline().decode().rstrip() sys.stdin.buffer.readline().decode().rstrip sys.stdin.buffer.readline().decode() sys.stdin.buffer.readline().decode sys.stdin.buffer.readline() sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline decode rstrip sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split())) sl lambda: list(map(str, sys.stdin.buffer.readline().decode().split())) list(map(str, sys.stdin.buffer.readline().decode().split())) list map(str, sys.stdin.buffer.readline().decode().split()) map str sys.stdin.buffer.readline().decode().split() sys.stdin.buffer.readline().decode().split sys.stdin.buffer.readline().decode() sys.stdin.buffer.readline().decode sys.stdin.buffer.readline() sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline decode split sys.stdin.buffer.readline().decode().rstrip() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) sys.stdin.buffer.readline().decode().rstrip() sys.stdin.buffer.readline().decode().rstrip sys.stdin.buffer.readline().decode() sys.stdin.buffer.readline().decode sys.stdin.buffer.readline() sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline decode rstrip isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)] isn lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)] [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)] n lcm = lambda x, y: (x * y) // math.gcd(x, y) lcm lambda x, y: (x * y) // math.gcd(x, y) (x * y) // math.gcd(x, y) x * y x y math.gcd(x, y) math.gcd math gcd x y x y MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 MAX = float('inf') MAX float('inf') float 'inf' def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    A = il()
    Q = ii()
    M = il()

    num_set = set()
    for i in range(1 << N):
        num = 0
        for n in range(N):
            if i >> n & 1:
                num += A[n]
        num_set.add(num)

    for m in M:
        if m in num_set:
            print('yes')
        else:
            print('no') main if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

     os.getenv("LOCAL") os.getenv os getenv "LOCAL" sys.stdin = open("input.txt", "r") sys.stdin sys stdin open("input.txt", "r") open "input.txt" "r" N = ii() N ii() ii A = il() A il() il Q = ii() Q ii() ii M = il() M il() il num_set = set() num_set set() set for i in range(1 << N):
        num = 0
        for n in range(N):
            if i >> n & 1:
                num += A[n]
        num_set.add(num)

     i range(1 << N) range 1 << N 1 N num = 0 num 0 for n in range(N):
            if i >> n & 1:
                num += A[n]
         n range(N) range N if i >> n & 1:
                num += A[n]
         i >> n & 1 i >> n i n 1 num += A[n] num A[n] A n num_set.add(num) num_set.add num_set add num for m in M:
        if m in num_set:
            print('yes')
        else:
            print('no') m M if m in num_set:
            print('yes')
        else:
            print('no') m in num_set m num_set print('yes') print 'yes' print('no') print 'no' if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)] lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)] isn ii = lambda: int(sys.stdin.buffer.readline().rstrip()) lambda: int(sys.stdin.buffer.readline().rstrip()) ii fl = lambda: list(map(float, sys.stdin.buffer.readline().split())) lambda: list(map(float, sys.stdin.buffer.readline().split())) fl iss = lambda: sys.stdin.buffer.readline().decode().rstrip() lambda: sys.stdin.buffer.readline().decode().rstrip() iss MAX = float('inf') float('inf') MAX il = lambda: list(map(int, sys.stdin.buffer.readline().split())) lambda: list(map(int, sys.stdin.buffer.readline().split())) il sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split())) lambda: list(map(str, sys.stdin.buffer.readline().decode().split())) sl iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)] lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)] iln MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD lcm = lambda x, y: (x * y) // math.gcd(x, y) lambda x, y: (x * y) // math.gcd(x, y) lcm def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    A = il()
    Q = ii()
    M = il()

    num_set = set()
    for i in range(1 << N):
        num = 0
        for n in range(N):
            if i >> n & 1:
                num += A[n]
        num_set.add(num)

    for m in M:
        if m in num_set:
            print('yes')
        else:
            print('no') def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    A = il()
    Q = ii()
    M = il()

    num_set = set()
    for i in range(1 << N):
        num = 0
        for n in range(N):
            if i >> n & 1:
                num += A[n]
        num_set.add(num)

    for m in M:
        if m in num_set:
            print('yes')
        else:
            print('no') main
import sys, os, math \
    # , bisect, itertools, collections, heapq, queue

# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
# from decimal import Decimal
# from collections import defaultdict, deque
# import copy

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    A = il()
    Q = ii()
    M = il()

    num_set = set()
    for i in range(1 << N):
        num = 0
        for n in range(N):
            if i >> n & 1:
                num += A[n]
        num_set.add(num)

    for m in M:
        if m in num_set:
            print('yes')
        else:
            print('no')


if __name__ == '__main__':
    main()

