def search(l, m):
    #dp = [[None for _ in range(len(l) + 1)] for __ in range(m + 1)]
    dp = [[False for _ in range(m+1)] for __ in range(len(l) + 1)]
    dp[0][0]= True
    for i in range(len(l)):
        for mi in range(m + 1):
            if l[i] <= mi:
                dp[i+1][mi] = dp[i][mi - l[i]] or dp[i][mi]
            else:
                dp[i+1][mi] = dp[i][mi]
    return dp[len(l)][m]


n = int(input())
l = list(map(int, input().split()))
q = int(input())
ms = list(map(int, input().split()))

for m in ms:
    if search(l, m):
        print('yes')
    else:
        print('no')
 def search(l, m):
    #dp = [[None for _ in range(len(l) + 1)] for __ in range(m + 1)]
    dp = [[False for _ in range(m+1)] for __ in range(len(l) + 1)]
    dp[0][0]= True
    for i in range(len(l)):
        for mi in range(m + 1):
            if l[i] <= mi:
                dp[i+1][mi] = dp[i][mi - l[i]] or dp[i][mi]
            else:
                dp[i+1][mi] = dp[i][mi]
    return dp[len(l)][m] search [False for _ in range(m+1)] for __ in range(len(l) + 1) for __ in range(len(l) + 1) __ range(len(l) + 1) range len(l) + 1 len(l) len l 1 for __ in range(len(l) + 1) [False for _ in range(m+1)] dp = [[False for _ in range(m+1)] for __ in range(len(l) + 1)] dp [[False for _ in range(m+1)] for __ in range(len(l) + 1)] dp[0][0]= True dp[0][0] [0] dp 0 0 True for i in range(len(l)):
        for mi in range(m + 1):
            if l[i] <= mi:
                dp[i+1][mi] = dp[i][mi - l[i]] or dp[i][mi]
            else:
                dp[i+1][mi] = dp[i][mi]
     i range(len(l)) range len(l) len l for mi in range(m + 1):
            if l[i] <= mi:
                dp[i+1][mi] = dp[i][mi - l[i]] or dp[i][mi]
            else:
                dp[i+1][mi] = dp[i][mi]
     mi range(m + 1) range m + 1 m 1 if l[i] <= mi:
                dp[i+1][mi] = dp[i][mi - l[i]] or dp[i][mi]
            else:
                dp[i+1][mi] = dp[i][mi]
     l[i] <= mi l[i] l i mi dp[i+1][mi] = dp[i][mi - l[i]] or dp[i][mi] dp[i+1][mi] [i+1] dp i+1 i 1 mi dp[i][mi - l[i]] or dp[i][mi] dp[i][mi - l[i]] [i] dp i mi - l[i] mi l[i] l i dp[i][mi] [i] dp i mi dp[i+1][mi] = dp[i][mi] dp[i+1][mi] [i+1] dp i+1 i 1 mi dp[i][mi] [i] dp i mi return dp[len(l)][m] dp[len(l)][m] [len(l)] dp len(l) len l m l l m m n = int(input()) n int(input()) int input() input l = list(map(int, input().split())) l 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 ms = list(map(int, input().split())) ms list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split for m in ms:
    if search(l, m):
        print('yes')
    else:
        print('no') m ms if search(l, m):
        print('yes')
    else:
        print('no') search(l, m) search l m print('yes') print 'yes' print('no') print 'no' def search(l, m):
    #dp = [[None for _ in range(len(l) + 1)] for __ in range(m + 1)]
    dp = [[False for _ in range(m+1)] for __ in range(len(l) + 1)]
    dp[0][0]= True
    for i in range(len(l)):
        for mi in range(m + 1):
            if l[i] <= mi:
                dp[i+1][mi] = dp[i][mi - l[i]] or dp[i][mi]
            else:
                dp[i+1][mi] = dp[i][mi]
    return dp[len(l)][m] def search(l, m):
    #dp = [[None for _ in range(len(l) + 1)] for __ in range(m + 1)]
    dp = [[False for _ in range(m+1)] for __ in range(len(l) + 1)]
    dp[0][0]= True
    for i in range(len(l)):
        for mi in range(m + 1):
            if l[i] <= mi:
                dp[i+1][mi] = dp[i][mi - l[i]] or dp[i][mi]
            else:
                dp[i+1][mi] = dp[i][mi]
    return dp[len(l)][m] search ms = list(map(int, input().split())) list(map(int, input().split())) ms q = int(input()) int(input()) q l = list(map(int, input().split())) list(map(int, input().split())) l n = int(input()) int(input()) n
def search(l, m):
    #dp = [[None for _ in range(len(l) + 1)] for __ in range(m + 1)]
    dp = [[False for _ in range(m+1)] for __ in range(len(l) + 1)]
    dp[0][0]= True
    for i in range(len(l)):
        for mi in range(m + 1):
            if l[i] <= mi:
                dp[i+1][mi] = dp[i][mi - l[i]] or dp[i][mi]
            else:
                dp[i+1][mi] = dp[i][mi]
    return dp[len(l)][m]


n = int(input())
l = list(map(int, input().split()))
q = int(input())
ms = list(map(int, input().split()))

for m in ms:
    if search(l, m):
        print('yes')
    else:
        print('no')

