from itertools import combinations


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


answer = ['no']*q
for i in range(1, n+1):
    for nums in combinations(a, i):
        val = sum(nums)
        if val in m:
            index = [i for i, num in enumerate(m) if val == num]
            for i in index:
                answer[i] = 'yes'

for i in answer:
    print(i)
 from itertools import combinations n = int(input()) n int(input()) int input() input a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split q = int(input()) q int(input()) int input() input m = list(map(int, input().split())) m list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split answer = ['no']*q answer ['no']*q ['no'] 'no' q for i in range(1, n+1):
    for nums in combinations(a, i):
        val = sum(nums)
        if val in m:
            index = [i for i, num in enumerate(m) if val == num]
            for i in index:
                answer[i] = 'yes' i range(1, n+1) range 1 n+1 n 1 for nums in combinations(a, i):
        val = sum(nums)
        if val in m:
            index = [i for i, num in enumerate(m) if val == num]
            for i in index:
                answer[i] = 'yes' nums combinations(a, i) combinations a i val = sum(nums) val sum(nums) sum nums if val in m:
            index = [i for i, num in enumerate(m) if val == num]
            for i in index:
                answer[i] = 'yes' val in m val m i for i, num in enumerate(m) if val == num for i, num in enumerate(m) if val == num i num enumerate(m) enumerate m val == num val num if val == num i index = [i for i, num in enumerate(m) if val == num] index [i for i, num in enumerate(m) if val == num] for i in index:
                answer[i] = 'yes' i index answer[i] = 'yes' answer[i] answer i 'yes' for i in answer:
    print(i) i answer print(i) print i answer = ['no']*q ['no']*q answer m = list(map(int, input().split())) list(map(int, input().split())) m index = [i for i, num in enumerate(m) if val == num] [i for i, num in enumerate(m) if val == num] index val = sum(nums) sum(nums) val n = int(input()) int(input()) n q = int(input()) int(input()) q a = list(map(int, input().split())) list(map(int, input().split())) a
from itertools import combinations


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


answer = ['no']*q
for i in range(1, n+1):
    for nums in combinations(a, i):
        val = sum(nums)
        if val in m:
            index = [i for i, num in enumerate(m) if val == num]
            for i in index:
                answer[i] = 'yes'

for i in answer:
    print(i)

