import sys
input = sys.stdin.readline
n = int(input())
A = list(map(int, input().split()))
q = int(input())
M = list(map(int, input().split()))

ans_map = {}

for i in range(1, n * 2000 + 1):
    ans_map[i] = 0

for i in range(2 ** n - 1):
    str_i = str(bin(i)[2:]).zfill(n)
    sum_a = 0
    for j, bit in enumerate(str_i):
        if bit == '1':
            sum_a += A[j]
    ans_map[sum_a] = 1

for m in M:
    if ans_map[m]:
        print('yes')
    else:
        print('no')
 import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline 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 ans_map = {} ans_map {} for i in range(1, n * 2000 + 1):
    ans_map[i] = 0 i range(1, n * 2000 + 1) range 1 n * 2000 + 1 n * 2000 n 2000 1 ans_map[i] = 0 ans_map[i] ans_map i 0 for i in range(2 ** n - 1):
    str_i = str(bin(i)[2:]).zfill(n)
    sum_a = 0
    for j, bit in enumerate(str_i):
        if bit == '1':
            sum_a += A[j]
    ans_map[sum_a] = 1 i range(2 ** n - 1) range 2 ** n - 1 2 ** n 2 n 1 str_i = str(bin(i)[2:]).zfill(n) str_i str(bin(i)[2:]).zfill(n) (bin(i)[2:]).zfill (bin(i)[2:]) str bin(i)[2:] (i) bin i 2: 2 zfill n sum_a = 0 sum_a 0 for j, bit in enumerate(str_i):
        if bit == '1':
            sum_a += A[j]
     j bit enumerate(str_i) enumerate str_i if bit == '1':
            sum_a += A[j]
     bit == '1' bit '1' sum_a += A[j] sum_a A[j] A j ans_map[sum_a] = 1 ans_map[sum_a] ans_map sum_a 1 for m in M:
    if ans_map[m]:
        print('yes')
    else:
        print('no') m M if ans_map[m]:
        print('yes')
    else:
        print('no') ans_map[m] ans_map m print('yes') print 'yes' print('no') print 'no' M = list(map(int, input().split())) list(map(int, input().split())) M n = int(input()) int(input()) n A = list(map(int, input().split())) list(map(int, input().split())) A sum_a += A[j] A[j] sum_a str_i = str(bin(i)[2:]).zfill(n) str(bin(i)[2:]).zfill(n) str_i sum_a = 0 0 sum_a ans_map = {} {} ans_map input = sys.stdin.readline sys.stdin.readline input q = int(input()) int(input()) q
import sys
input = sys.stdin.readline
n = int(input())
A = list(map(int, input().split()))
q = int(input())
M = list(map(int, input().split()))

ans_map = {}

for i in range(1, n * 2000 + 1):
    ans_map[i] = 0

for i in range(2 ** n - 1):
    str_i = str(bin(i)[2:]).zfill(n)
    sum_a = 0
    for j, bit in enumerate(str_i):
        if bit == '1':
            sum_a += A[j]
    ans_map[sum_a] = 1

for m in M:
    if ans_map[m]:
        print('yes')
    else:
        print('no')

