N = int(eval(input()))

A = list(map(int, input().split()))

Q = int(eval(input()))

M = list(map(int, input().split()))



exhaustive_dict = {}



def create_exhastive_list(head, sum):

    for i in range(head, N):

        sum += A[i]

        exhaustive_dict[sum] = 1

        create_exhastive_list(i+1, sum)

        sum -= A[i]



head = 0

sum = 0

create_exhastive_list(head, sum)



for target in M:

    if target in list(exhaustive_dict.keys()):

        print("yes")

    else:

        print("no")

N = int(eval(input()))

A = list(map(int, input().split()))

Q = int(eval(input()))

M = list(map(int, input().split()))



combinations = {}



def create_combinations(idx, sum):

    combinations[sum] = 1

    if idx >= N:

        return

    create_combinations(idx+1, sum)

    create_combinations(idx+1, sum+A[idx])

    return



create_combinations(0, 0)



for target in M:

    if target in list(combinations.keys()):

        print("yes")

    else:

        print("no")

N = int(eval(input()))
A = list(map(int, input().split()))
Q = int(eval(input()))
M = list(map(int, input().split()))
exhaustive_dict = {}


def create_exhastive_list(head, sum):
    for i in range(head, N):
        sum += A[i]
        exhaustive_dict[sum] = 1
        create_exhastive_list(i + 1, sum)
        sum -= A[i]


head = 0
sum = 0
create_exhastive_list(head, sum)
for target in M:
    if target in list(exhaustive_dict.keys()):
        print("yes")
    else:
        print("no")

N = int(eval(input()))
A = list(map(int, input().split()))
Q = int(eval(input()))
M = list(map(int, input().split()))
combinations = {}


def create_combinations(idx, sum):
    combinations[sum] = 1
    if idx >= N:
        return
    create_combinations(idx + 1, sum)
    create_combinations(idx + 1, sum + A[idx])
    return


create_combinations(0, 0)
for target in M:
    if target in list(combinations.keys()):
        print("yes")
    else:
        print("no")

-exhaustive_dict = {} +combinations = {} -def create_exhastive_list(head, sum): -    for i in range(head, N): -        sum += A[i] -        exhaustive_dict[sum] = 1 -        create_exhastive_list(i + 1, sum) -        sum -= A[i] +def create_combinations(idx, sum): +    combinations[sum] = 1 +    if idx >= N: +        return +    create_combinations(idx + 1, sum) +    create_combinations(idx + 1, sum + A[idx]) +    return -head = 0 -sum = 0 -create_exhastive_list(head, sum) +create_combinations(0, 0) -    if target in list(exhaustive_dict.keys()): +    if target in list(combinations.keys()):