from itertools import combinations



n, a, q, ms = int(eval(input())), list(map(int, input().split())), eval(input()), list(map(int, input().split()))



cache = {}





def sum_a(tmp, t):

    global a, cache

    if t in cache:

        return tmp + cache[t]

    elif len(t) == 1:

        return tmp + a[t[0]]

    else:

        cache[t] = result = sum_a(tmp + a[t[0]], t[1:])

        return result





l = list(sum_a(0, t) for i in range(n) for t in combinations(list(range(n)), i + 1))



for m in ms:

    print(('yes' if m in l else 'no'))
from itertools import combinations



n, a, q, ms, cache = int(eval(input())), list(map(int, input().split())), eval(input()), list(map(int, input().split())), {}





def sum_a(tmp, t):

    global a, cache

    if t in cache:

        return tmp + cache[t]

    elif len(t) == 1:

        return tmp + a[t[0]]

    else:

        cache[t] = result = sum_a(tmp + a[t[0]], t[1:])

        return result





l = set(sum_a(0, t) for i in range(n) for t in combinations(list(range(n)), i + 1))



for m in ms:

    print(('yes' if m in l else 'no'))
from itertools import combinations

n, a, q, ms = (
    int(eval(input())),
    list(map(int, input().split())),
    eval(input()),
    list(map(int, input().split())),
)
cache = {}


def sum_a(tmp, t):
    global a, cache
    if t in cache:
        return tmp + cache[t]
    elif len(t) == 1:
        return tmp + a[t[0]]
    else:
        cache[t] = result = sum_a(tmp + a[t[0]], t[1:])
        return result


l = list(sum_a(0, t) for i in range(n) for t in combinations(list(range(n)), i + 1))
for m in ms:
    print(("yes" if m in l else "no"))

from itertools import combinations

n, a, q, ms, cache = (
    int(eval(input())),
    list(map(int, input().split())),
    eval(input()),
    list(map(int, input().split())),
    {},
)


def sum_a(tmp, t):
    global a, cache
    if t in cache:
        return tmp + cache[t]
    elif len(t) == 1:
        return tmp + a[t[0]]
    else:
        cache[t] = result = sum_a(tmp + a[t[0]], t[1:])
        return result


l = set(sum_a(0, t) for i in range(n) for t in combinations(list(range(n)), i + 1))
for m in ms:
    print(("yes" if m in l else "no"))

-n, a, q, ms = ( +n, a, q, ms, cache = ( +    {}, -cache = {} -l = list(sum_a(0, t) for i in range(n) for t in combinations(list(range(n)), i + 1)) +l = set(sum_a(0, t) for i in range(n) for t in combinations(list(range(n)), i + 1))