import sys

n = int(input())
A = list(map(int, sys.stdin.readline()[:-1].split()))

q = int(input())
M = list(map(int, sys.stdin.readline()[:-1].split()))

R = [[None] * 2000 for i in range(n+1)]
def solve(A, n, i, m):
    if R[i][m] != None:
        return R[i][m]
    if m == 0:
        R[i][m] = True
        return True
    if n <= i:
        R[i][m] = False
        return False
    a = A[i]
    R[i][m] = (solve(A, n, i+1, m) or solve(A, n, i+1, m - a))
    return R[i][m]

for m in M:
    if solve(A, n, 0, m):
        print('yes')
    else:
        print('no') import sys sys n = int(input()) n int(input()) int input() input A = list(map(int, sys.stdin.readline()[:-1].split())) A list(map(int, sys.stdin.readline()[:-1].split())) list map(int, sys.stdin.readline()[:-1].split()) map int sys.stdin.readline()[:-1].split() [:-1].split [:-1] sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline :-1 -1 split q = int(input()) q int(input()) int input() input M = list(map(int, sys.stdin.readline()[:-1].split())) M list(map(int, sys.stdin.readline()[:-1].split())) list map(int, sys.stdin.readline()[:-1].split()) map int sys.stdin.readline()[:-1].split() [:-1].split [:-1] sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline :-1 -1 split [None] * 2000 for i in range(n+1) for i in range(n+1) i range(n+1) range n+1 n 1 for i in range(n+1) [None] * 2000 [None] None 2000 R = [[None] * 2000 for i in range(n+1)] R [[None] * 2000 for i in range(n+1)] def solve(A, n, i, m):
    if R[i][m] != None:
        return R[i][m]
    if m == 0:
        R[i][m] = True
        return True
    if n <= i:
        R[i][m] = False
        return False
    a = A[i]
    R[i][m] = (solve(A, n, i+1, m) or solve(A, n, i+1, m - a))
    return R[i][m] solve if R[i][m] != None:
        return R[i][m]
     R[i][m] != None R[i][m] [i] R i m None return R[i][m] R[i][m] [i] R i m if m == 0:
        R[i][m] = True
        return True
     m == 0 m 0 R[i][m] = True R[i][m] [i] R i m True return True True if n <= i:
        R[i][m] = False
        return False
     n <= i n i R[i][m] = False R[i][m] [i] R i m False return False False a = A[i] a A[i] A i R[i][m] = (solve(A, n, i+1, m) or solve(A, n, i+1, m - a)) R[i][m] [i] R i m solve(A, n, i+1, m) or solve(A, n, i+1, m - a) solve(A, n, i+1, m) solve A n i+1 i 1 m solve(A, n, i+1, m - a) solve A n i+1 i 1 m - a m a return R[i][m] R[i][m] [i] R i m A A n n i i m m for m in M:
    if solve(A, n, 0, m):
        print('yes')
    else:
        print('no') m M if solve(A, n, 0, m):
        print('yes')
    else:
        print('no') solve(A, n, 0, m) solve A n 0 m print('yes') print 'yes' print('no') print 'no' M = list(map(int, sys.stdin.readline()[:-1].split())) list(map(int, sys.stdin.readline()[:-1].split())) M q = int(input()) int(input()) q def solve(A, n, i, m):
    if R[i][m] != None:
        return R[i][m]
    if m == 0:
        R[i][m] = True
        return True
    if n <= i:
        R[i][m] = False
        return False
    a = A[i]
    R[i][m] = (solve(A, n, i+1, m) or solve(A, n, i+1, m - a))
    return R[i][m] def solve(A, n, i, m):
    if R[i][m] != None:
        return R[i][m]
    if m == 0:
        R[i][m] = True
        return True
    if n <= i:
        R[i][m] = False
        return False
    a = A[i]
    R[i][m] = (solve(A, n, i+1, m) or solve(A, n, i+1, m - a))
    return R[i][m] solve n = int(input()) int(input()) n A = list(map(int, sys.stdin.readline()[:-1].split())) list(map(int, sys.stdin.readline()[:-1].split())) A R = [[None] * 2000 for i in range(n+1)] [[None] * 2000 for i in range(n+1)] R
import sys

n = int(input())
A = list(map(int, sys.stdin.readline()[:-1].split()))

q = int(input())
M = list(map(int, sys.stdin.readline()[:-1].split()))

R = [[None] * 2000 for i in range(n+1)]
def solve(A, n, i, m):
    if R[i][m] != None:
        return R[i][m]
    if m == 0:
        R[i][m] = True
        return True
    if n <= i:
        R[i][m] = False
        return False
    a = A[i]
    R[i][m] = (solve(A, n, i+1, m) or solve(A, n, i+1, m - a))
    return R[i][m]

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