n = int(input())
A = list(map(int, input().split()))
q = int(input())
m = list(map(int, input().split()))
memo = [[None]*2000 for i in range(2000)]


def exhaustivesearch(i, target):
    if memo[i][target] is not None:
        return memo[i][target]
    if target == 0:
        memo[i][target] = True
        return True
    if i >= n:
        memo[i][target] = False
        return False
    else:
        memo[i][target] = exhaustivesearch(i + 1, target) or exhaustivesearch(i + 1, target-A[i])
        return memo[i][target]


for j in m:
    if exhaustivesearch(0, j):
        print("yes")
    else:
        print("no") 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 [None]*2000 for i in range(2000) for i in range(2000) i range(2000) range 2000 for i in range(2000) [None]*2000 [None] None 2000 memo = [[None]*2000 for i in range(2000)] memo [[None]*2000 for i in range(2000)] def exhaustivesearch(i, target):
    if memo[i][target] is not None:
        return memo[i][target]
    if target == 0:
        memo[i][target] = True
        return True
    if i >= n:
        memo[i][target] = False
        return False
    else:
        memo[i][target] = exhaustivesearch(i + 1, target) or exhaustivesearch(i + 1, target-A[i])
        return memo[i][target] exhaustivesearch if memo[i][target] is not None:
        return memo[i][target]
     memo[i][target] is not None memo[i][target] [i] memo i target None return memo[i][target] memo[i][target] [i] memo i target if target == 0:
        memo[i][target] = True
        return True
     target == 0 target 0 memo[i][target] = True memo[i][target] [i] memo i target True return True True if i >= n:
        memo[i][target] = False
        return False
    else:
        memo[i][target] = exhaustivesearch(i + 1, target) or exhaustivesearch(i + 1, target-A[i])
        return memo[i][target] i >= n i n memo[i][target] = False memo[i][target] [i] memo i target False return False False memo[i][target] = exhaustivesearch(i + 1, target) or exhaustivesearch(i + 1, target-A[i]) memo[i][target] [i] memo i target exhaustivesearch(i + 1, target) or exhaustivesearch(i + 1, target-A[i]) exhaustivesearch(i + 1, target) exhaustivesearch i + 1 i 1 target exhaustivesearch(i + 1, target-A[i]) exhaustivesearch i + 1 i 1 target-A[i] target A[i] A i return memo[i][target] memo[i][target] [i] memo i target i i target target for j in m:
    if exhaustivesearch(0, j):
        print("yes")
    else:
        print("no") j m if exhaustivesearch(0, j):
        print("yes")
    else:
        print("no") exhaustivesearch(0, j) exhaustivesearch 0 j print("yes") print "yes" print("no") print "no" n = int(input()) int(input()) n def exhaustivesearch(i, target):
    if memo[i][target] is not None:
        return memo[i][target]
    if target == 0:
        memo[i][target] = True
        return True
    if i >= n:
        memo[i][target] = False
        return False
    else:
        memo[i][target] = exhaustivesearch(i + 1, target) or exhaustivesearch(i + 1, target-A[i])
        return memo[i][target] def exhaustivesearch(i, target):
    if memo[i][target] is not None:
        return memo[i][target]
    if target == 0:
        memo[i][target] = True
        return True
    if i >= n:
        memo[i][target] = False
        return False
    else:
        memo[i][target] = exhaustivesearch(i + 1, target) or exhaustivesearch(i + 1, target-A[i])
        return memo[i][target] exhaustivesearch q = int(input()) int(input()) q m = list(map(int, input().split())) list(map(int, input().split())) m memo = [[None]*2000 for i in range(2000)] [[None]*2000 for i in range(2000)] memo A = list(map(int, input().split())) list(map(int, input().split())) A
n = int(input())
A = list(map(int, input().split()))
q = int(input())
m = list(map(int, input().split()))
memo = [[None]*2000 for i in range(2000)]


def exhaustivesearch(i, target):
    if memo[i][target] is not None:
        return memo[i][target]
    if target == 0:
        memo[i][target] = True
        return True
    if i >= n:
        memo[i][target] = False
        return False
    else:
        memo[i][target] = exhaustivesearch(i + 1, target) or exhaustivesearch(i + 1, target-A[i])
        return memo[i][target]


for j in m:
    if exhaustivesearch(0, j):
        print("yes")
    else:
        print("no")