# ALDS1_5_A.py


def rec(a, use):
    if use >= N:
        memo[a] = True
        return
    _next = A[use]
    rec(a+_next,use+1)
    rec(a,use+1)


N = int(input())
A = list(map(int, input().split()))
Q = int(input())
M = list(map(int, input().split()))

memo = [False]*2000
rec(0, 0)
# print(memo)
for i in M:
    if memo[i]:
        print('yes')
    else:
        print('no')
 def rec(a, use):
    if use >= N:
        memo[a] = True
        return
    _next = A[use]
    rec(a+_next,use+1)
    rec(a,use+1) rec if use >= N:
        memo[a] = True
        return
     use >= N use N memo[a] = True memo[a] memo a True return _next = A[use] _next A[use] A use rec(a+_next,use+1) rec a+_next a _next use+1 use 1 rec(a,use+1) rec a use+1 use 1 a a use use 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 memo = [False]*2000 memo [False]*2000 [False] False 2000 rec(0, 0) rec 0 0 for i in M:
    if memo[i]:
        print('yes')
    else:
        print('no') i M if memo[i]:
        print('yes')
    else:
        print('no') memo[i] memo i print('yes') print 'yes' print('no') print 'no' memo = [False]*2000 [False]*2000 memo N = int(input()) int(input()) N Q = int(input()) int(input()) Q A = list(map(int, input().split())) list(map(int, input().split())) A M = list(map(int, input().split())) list(map(int, input().split())) M def rec(a, use):
    if use >= N:
        memo[a] = True
        return
    _next = A[use]
    rec(a+_next,use+1)
    rec(a,use+1) def rec(a, use):
    if use >= N:
        memo[a] = True
        return
    _next = A[use]
    rec(a+_next,use+1)
    rec(a,use+1) rec
# ALDS1_5_A.py


def rec(a, use):
    if use >= N:
        memo[a] = True
        return
    _next = A[use]
    rec(a+_next,use+1)
    rec(a,use+1)


N = int(input())
A = list(map(int, input().split()))
Q = int(input())
M = list(map(int, input().split()))

memo = [False]*2000
rec(0, 0)
# print(memo)
for i in M:
    if memo[i]:
        print('yes')
    else:
        print('no')

