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

table = [[-1 for i in range(max(M)+1)] for j in range(n)]

def solve(i, m):
    if m == 0:
        return True
    elif i >= n:
        return False
    elif table[i][m] != -1:
        return table[i][m]
    elif m - A[i] >= 0:
        res = solve(i + 1, m) or solve(i + 1, m - A[i])
        table[i][m] = res
        return res
    else:
        res = solve(i + 1, m)
        table[i][m] = res
        return res

for m in M:
    if solve(0, m):
        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 [-1 for i in range(max(M)+1)] for j in range(n) for j in range(n) j range(n) range n for j in range(n) [-1 for i in range(max(M)+1)] table = [[-1 for i in range(max(M)+1)] for j in range(n)] table [[-1 for i in range(max(M)+1)] for j in range(n)] def solve(i, m):
    if m == 0:
        return True
    elif i >= n:
        return False
    elif table[i][m] != -1:
        return table[i][m]
    elif m - A[i] >= 0:
        res = solve(i + 1, m) or solve(i + 1, m - A[i])
        table[i][m] = res
        return res
    else:
        res = solve(i + 1, m)
        table[i][m] = res
        return res solve if m == 0:
        return True
    elif i >= n:
        return False
    elif table[i][m] != -1:
        return table[i][m]
    elif m - A[i] >= 0:
        res = solve(i + 1, m) or solve(i + 1, m - A[i])
        table[i][m] = res
        return res
    else:
        res = solve(i + 1, m)
        table[i][m] = res
        return res m == 0 m 0 return True True elif i >= n:
        return False
     i >= n i n return False False elif table[i][m] != -1:
        return table[i][m]
     table[i][m] != -1 table[i][m] [i] table i m -1 return table[i][m] table[i][m] [i] table i m elif m - A[i] >= 0:
        res = solve(i + 1, m) or solve(i + 1, m - A[i])
        table[i][m] = res
        return res
     m - A[i] >= 0 m - A[i] m A[i] A i 0 res = solve(i + 1, m) or solve(i + 1, m - A[i]) res solve(i + 1, m) or solve(i + 1, m - A[i]) solve(i + 1, m) solve i + 1 i 1 m solve(i + 1, m - A[i]) solve i + 1 i 1 m - A[i] m A[i] A i table[i][m] = res table[i][m] [i] table i m res return res res res = solve(i + 1, m) res solve(i + 1, m) solve i + 1 i 1 m table[i][m] = res table[i][m] [i] table i m res return res res i i m m for m in M:
    if solve(0, m):
        print('yes')
    else:
        print('no') m M if solve(0, m):
        print('yes')
    else:
        print('no') solve(0, m) solve 0 m print('yes') print 'yes' print('no') print 'no' table = [[-1 for i in range(max(M)+1)] for j in range(n)] [[-1 for i in range(max(M)+1)] for j in range(n)] table M = list(map(int, input().split())) list(map(int, input().split())) M n = int(input()) int(input()) n def solve(i, m):
    if m == 0:
        return True
    elif i >= n:
        return False
    elif table[i][m] != -1:
        return table[i][m]
    elif m - A[i] >= 0:
        res = solve(i + 1, m) or solve(i + 1, m - A[i])
        table[i][m] = res
        return res
    else:
        res = solve(i + 1, m)
        table[i][m] = res
        return res def solve(i, m):
    if m == 0:
        return True
    elif i >= n:
        return False
    elif table[i][m] != -1:
        return table[i][m]
    elif m - A[i] >= 0:
        res = solve(i + 1, m) or solve(i + 1, m - A[i])
        table[i][m] = res
        return res
    else:
        res = solve(i + 1, m)
        table[i][m] = res
        return res solve q = int(input()) int(input()) q 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()))

table = [[-1 for i in range(max(M)+1)] for j in range(n)]

def solve(i, m):
    if m == 0:
        return True
    elif i >= n:
        return False
    elif table[i][m] != -1:
        return table[i][m]
    elif m - A[i] >= 0:
        res = solve(i + 1, m) or solve(i + 1, m - A[i])
        table[i][m] = res
        return res
    else:
        res = solve(i + 1, m)
        table[i][m] = res
        return res

for m in M:
    if solve(0, m):
        print('yes')
    else:
        print('no')