from itertools import combinations



if __name__ == '__main__':

    # ??????????????\???

    num1 = int(eval(input()))

    A = [int(x) for x in input().split(' ')]

    num2 = int(eval(input()))

    M = [int(x) for x in input().split(' ')]

    #A = [1, 5, 7, 10, 21]

    #pick = 4

    #M = [2, 4, 17, 8]



    # ????????????

    results = ['no' for x in range(len(M))]  # M?????¨??????????´?????????????????????????????????§????????????????????±???(no)??¨????????????



    for p in range(1, len(A)+1):  # A????????????1????????¨????????°?????????????????¢????????????

        combi = combinations(A, p)  # n??????????????¢??????????????´????????¨?????????????????????

        for choice in combi:

            total = sum(choice)

            while total in M:

                i = M.index(total)

                results[i] = 'yes'

                M[i] = 'Done'



    # ???????????????

    for txt in results:

        print(txt)
from functools import lru_cache



@lru_cache(maxsize=None)

def is_possible(n, target, total):

    if n == 0:

        return total == target

    return is_possible(n-1, target, total) or is_possible(n-1, target, total + A[n-1])





n = int(eval(input()))

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

_ = int(eval(input()))





for target in map(int, input().split()):

    print(('yes' if is_possible(n, target, 0) else'no'))



from itertools import combinations

if __name__ == "__main__":
    # ??????????????\???
    num1 = int(eval(input()))
    A = [int(x) for x in input().split(" ")]
    num2 = int(eval(input()))
    M = [int(x) for x in input().split(" ")]
    # A = [1, 5, 7, 10, 21]
    # pick = 4
    # M = [2, 4, 17, 8]
    # ????????????
    results = [
        "no" for x in range(len(M))
    ]  # M?????¨??????????´?????????????????????????????????§????????????????????±???(no)??¨????????????
    for p in range(
        1, len(A) + 1
    ):  # A????????????1????????¨????????°?????????????????¢????????????
        combi = combinations(
            A, p
        )  # n??????????????¢??????????????´????????¨?????????????????????
        for choice in combi:
            total = sum(choice)
            while total in M:
                i = M.index(total)
                results[i] = "yes"
                M[i] = "Done"
    # ???????????????
    for txt in results:
        print(txt)

from functools import lru_cache


@lru_cache(maxsize=None)
def is_possible(n, target, total):
    if n == 0:
        return total == target
    return is_possible(n - 1, target, total) or is_possible(
        n - 1, target, total + A[n - 1]
    )


n = int(eval(input()))
A = [int(i) for i in input().split()]
_ = int(eval(input()))
for target in map(int, input().split()):
    print(("yes" if is_possible(n, target, 0) else "no"))

-from itertools import combinations +from functools import lru_cache -if __name__ == "__main__": -    # ??????????????\??? -    num1 = int(eval(input())) -    A = [int(x) for x in input().split(" ")] -    num2 = int(eval(input())) -    M = [int(x) for x in input().split(" ")] -    # A = [1, 5, 7, 10, 21] -    # pick = 4 -    # M = [2, 4, 17, 8] -    # ???????????? -    results = [ -        "no" for x in range(len(M)) -    ]  # M?????¨??????????´?????????????????????????????????§????????????????????±???(no)??¨???????????? -    for p in range( -        1, len(A) + 1 -    ):  # A????????????1????????¨????????°?????????????????¢???????????? -        combi = combinations( -            A, p -        )  # n??????????????¢??????????????´????????¨????????????????????? -        for choice in combi: -            total = sum(choice) -            while total in M: -                i = M.index(total) -                results[i] = "yes" -                M[i] = "Done" -    # ??????????????? -    for txt in results: -        print(txt) + +@lru_cache(maxsize=None) +def is_possible(n, target, total): +    if n == 0: +        return total == target +    return is_possible(n - 1, target, total) or is_possible( +        n - 1, target, total + A[n - 1] +    ) + + +n = int(eval(input())) +A = [int(i) for i in input().split()] +_ = int(eval(input())) +for target in map(int, input().split()): +    print(("yes" if is_possible(n, target, 0) else "no"))