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

"""
def exhaustive_search(m, i):
    if i == n:
        return 0
    if m < 0:
        return 0
    if m == A[i]:
        return 1
    return max(exhaustive_search(m, i + 1), exhaustive_search(m - A[i], i + 1))
"""

def dp_search(m):
    dp = [[1] + [0] * m for _ in range(n + 1)] # dp[i][j] i番目まででjを作れるか
    for i in range(1, n+1):
        for j in range(1, m+1):
            if j >= A[i-1]:
                dp[i][j] = max(dp[i-1][j], dp[i-1][j - A[i-1]])
            else:
                dp[i][j] = dp[i-1][j]
    return dp[n][m]

for mi in m:
    if dp_search(mi):
        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 """
def exhaustive_search(m, i):
    if i == n:
        return 0
    if m < 0:
        return 0
    if m == A[i]:
        return 1
    return max(exhaustive_search(m, i + 1), exhaustive_search(m - A[i], i + 1))
""" def dp_search(m):
    dp = [[1] + [0] * m for _ in range(n + 1)] # dp[i][j] i番目まででjを作れるか
    for i in range(1, n+1):
        for j in range(1, m+1):
            if j >= A[i-1]:
                dp[i][j] = max(dp[i-1][j], dp[i-1][j - A[i-1]])
            else:
                dp[i][j] = dp[i-1][j]
    return dp[n][m] dp_search [1] + [0] * m for _ in range(n + 1) for _ in range(n + 1) _ range(n + 1) range n + 1 n 1 for _ in range(n + 1) [1] + [0] * m [1] 1 [0] * m [0] 0 m dp = [[1] + [0] * m for _ in range(n + 1)] dp [[1] + [0] * m for _ in range(n + 1)] for i in range(1, n+1):
        for j in range(1, m+1):
            if j >= A[i-1]:
                dp[i][j] = max(dp[i-1][j], dp[i-1][j - A[i-1]])
            else:
                dp[i][j] = dp[i-1][j]
     i range(1, n+1) range 1 n+1 n 1 for j in range(1, m+1):
            if j >= A[i-1]:
                dp[i][j] = max(dp[i-1][j], dp[i-1][j - A[i-1]])
            else:
                dp[i][j] = dp[i-1][j]
     j range(1, m+1) range 1 m+1 m 1 if j >= A[i-1]:
                dp[i][j] = max(dp[i-1][j], dp[i-1][j - A[i-1]])
            else:
                dp[i][j] = dp[i-1][j]
     j >= A[i-1] j A[i-1] A i-1 i 1 dp[i][j] = max(dp[i-1][j], dp[i-1][j - A[i-1]]) dp[i][j] [i] dp i j max(dp[i-1][j], dp[i-1][j - A[i-1]]) max dp[i-1][j] [i-1] dp i-1 i 1 j dp[i-1][j - A[i-1]] [i-1] dp i-1 i 1 j - A[i-1] j A[i-1] A i-1 i 1 dp[i][j] = dp[i-1][j] dp[i][j] [i] dp i j dp[i-1][j] [i-1] dp i-1 i 1 j return dp[n][m] dp[n][m] [n] dp n m m m for mi in m:
    if dp_search(mi):
        print("yes")
    else:
        print("no") mi m if dp_search(mi):
        print("yes")
    else:
        print("no") dp_search(mi) dp_search mi print("yes") print "yes" print("no") print "no" n = int(input()) int(input()) n q = int(input()) int(input()) q def dp_search(m):
    dp = [[1] + [0] * m for _ in range(n + 1)] # dp[i][j] i番目まででjを作れるか
    for i in range(1, n+1):
        for j in range(1, m+1):
            if j >= A[i-1]:
                dp[i][j] = max(dp[i-1][j], dp[i-1][j - A[i-1]])
            else:
                dp[i][j] = dp[i-1][j]
    return dp[n][m] def dp_search(m):
    dp = [[1] + [0] * m for _ in range(n + 1)] # dp[i][j] i番目まででjを作れるか
    for i in range(1, n+1):
        for j in range(1, m+1):
            if j >= A[i-1]:
                dp[i][j] = max(dp[i-1][j], dp[i-1][j - A[i-1]])
            else:
                dp[i][j] = dp[i-1][j]
    return dp[n][m] dp_search m = list(map(int, input().split())) list(map(int, input().split())) m 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()))

"""
def exhaustive_search(m, i):
    if i == n:
        return 0
    if m < 0:
        return 0
    if m == A[i]:
        return 1
    return max(exhaustive_search(m, i + 1), exhaustive_search(m - A[i], i + 1))
"""

def dp_search(m):
    dp = [[1] + [0] * m for _ in range(n + 1)] # dp[i][j] i番目まででjを作れるか
    for i in range(1, n+1):
        for j in range(1, m+1):
            if j >= A[i-1]:
                dp[i][j] = max(dp[i-1][j], dp[i-1][j - A[i-1]])
            else:
                dp[i][j] = dp[i-1][j]
    return dp[n][m]

for mi in m:
    if dp_search(mi):
        print("yes")
    else:
        print("no")
