def solve(A, i, m, n):
    """Return if it is possible to make value m with some elements in A.

    n is length of A.
    i is index.
    R is the record of answer i, m.
    Using Divide-and-Conquer method.
    """

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


import sys

n = int(sys.stdin.readline())
A = tuple(map(int, sys.stdin.readline().split()))
q = int(sys.stdin.readline())
M = tuple(map(int, sys.stdin.readline().split()))

s_A = sum(A)
R = [[None] * 2000 for i in range(n + 1)]

ans = ''

for m in M:
    if s_A < m:
        ans += 'no\n'
    elif solve(A, 0, m, n):
        ans += 'yes\n'
    else:
        ans += 'no\n'

print(ans, end = '') def solve(A, i, m, n):
    """Return if it is possible to make value m with some elements in A.

    n is length of A.
    i is index.
    R is the record of answer i, m.
    Using Divide-and-Conquer method.
    """

    if R[i][m] != None:
        return R[i][m]
    if m == 0:
        R[i][m] = True
        return True
    elif i >= n:
        R[i][m] = False
        return False
    else:
        ans = solve(A, i + 1, m, n) or solve(A, i + 1, m - A[i], n)
        R[i][m] = ans
        return ans solve """Return if it is possible to make value m with some elements in A.

    n is length of A.
    i is index.
    R is the record of answer i, m.
    Using Divide-and-Conquer method.
    """ 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
    elif i >= n:
        R[i][m] = False
        return False
    else:
        ans = solve(A, i + 1, m, n) or solve(A, i + 1, m - A[i], n)
        R[i][m] = ans
        return ans m == 0 m 0 R[i][m] = True R[i][m] [i] R i m True return True True elif i >= n:
        R[i][m] = False
        return False
     i >= n i n R[i][m] = False R[i][m] [i] R i m False return False False ans = solve(A, i + 1, m, n) or solve(A, i + 1, m - A[i], n) ans solve(A, i + 1, m, n) or solve(A, i + 1, m - A[i], n) solve(A, i + 1, m, n) solve A i + 1 i 1 m n solve(A, i + 1, m - A[i], n) solve A i + 1 i 1 m - A[i] m A[i] A i n R[i][m] = ans R[i][m] [i] R i m ans return ans ans A A i i m m n n import sys sys n = int(sys.stdin.readline()) n int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline A = tuple(map(int, sys.stdin.readline().split())) A tuple(map(int, sys.stdin.readline().split())) tuple map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split q = int(sys.stdin.readline()) q int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline M = tuple(map(int, sys.stdin.readline().split())) M tuple(map(int, sys.stdin.readline().split())) tuple map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split s_A = sum(A) s_A sum(A) sum A [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)] ans = '' ans '' for m in M:
    if s_A < m:
        ans += 'no\n'
    elif solve(A, 0, m, n):
        ans += 'yes\n'
    else:
        ans += 'no\n' m M if s_A < m:
        ans += 'no\n'
    elif solve(A, 0, m, n):
        ans += 'yes\n'
    else:
        ans += 'no\n' s_A < m s_A m ans += 'no\n' ans 'no\n' elif solve(A, 0, m, n):
        ans += 'yes\n'
     solve(A, 0, m, n) solve A 0 m n ans += 'yes\n' ans 'yes\n' ans += 'no\n' ans 'no\n' print(ans, end = '') print ans end = '' end '' def solve(A, i, m, n):
    """Return if it is possible to make value m with some elements in A.

    n is length of A.
    i is index.
    R is the record of answer i, m.
    Using Divide-and-Conquer method.
    """

    if R[i][m] != None:
        return R[i][m]
    if m == 0:
        R[i][m] = True
        return True
    elif i >= n:
        R[i][m] = False
        return False
    else:
        ans = solve(A, i + 1, m, n) or solve(A, i + 1, m - A[i], n)
        R[i][m] = ans
        return ans def solve(A, i, m, n):
    """Return if it is possible to make value m with some elements in A.

    n is length of A.
    i is index.
    R is the record of answer i, m.
    Using Divide-and-Conquer method.
    """

    if R[i][m] != None:
        return R[i][m]
    if m == 0:
        R[i][m] = True
        return True
    elif i >= n:
        R[i][m] = False
        return False
    else:
        ans = solve(A, i + 1, m, n) or solve(A, i + 1, m - A[i], n)
        R[i][m] = ans
        return ans solve q = int(sys.stdin.readline()) int(sys.stdin.readline()) q s_A = sum(A) sum(A) s_A R = [[None] * 2000 for i in range(n + 1)] [[None] * 2000 for i in range(n + 1)] R ans += 'yes\n' 'yes\n' ans A = tuple(map(int, sys.stdin.readline().split())) tuple(map(int, sys.stdin.readline().split())) A M = tuple(map(int, sys.stdin.readline().split())) tuple(map(int, sys.stdin.readline().split())) M ans = '' '' ans ans += 'no\n' 'no\n' ans n = int(sys.stdin.readline()) int(sys.stdin.readline()) n ans += 'no\n' 'no\n' ans
def solve(A, i, m, n):
    """Return if it is possible to make value m with some elements in A.

    n is length of A.
    i is index.
    R is the record of answer i, m.
    Using Divide-and-Conquer method.
    """

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


import sys

n = int(sys.stdin.readline())
A = tuple(map(int, sys.stdin.readline().split()))
q = int(sys.stdin.readline())
M = tuple(map(int, sys.stdin.readline().split()))

s_A = sum(A)
R = [[None] * 2000 for i in range(n + 1)]

ans = ''

for m in M:
    if s_A < m:
        ans += 'no\n'
    elif solve(A, 0, m, n):
        ans += 'yes\n'
    else:
        ans += 'no\n'

print(ans, end = '')