# coding=utf-8

def solve(i, m):
    global A
    if ever_calc[i][m] != None:
        return ever_calc[i][m]
    if m == 0:
        ever_calc[i][m] = True
        return True
    elif m < 0:
        ever_calc[i][m] = False
        return False
    elif i == n:
        ever_calc[i][m] = False
        return False
    else:
        result = (solve(i+1, m) or solve(i+1, m-A[i]))
        ever_calc[i][m] = result
        return result

n = int(input())
A = tuple(map(int, input().split()))
q = int(input())
M = tuple(map(int, input().split()))
sum_A = sum(A)
ever_calc = [[None] * 2000 for i in range(n+1)]

for m in M:
    if m > sum_A:
        print('no')
    elif solve(0, m):
        print('yes')
    else:
        print('no') def solve(i, m):
    global A
    if ever_calc[i][m] != None:
        return ever_calc[i][m]
    if m == 0:
        ever_calc[i][m] = True
        return True
    elif m < 0:
        ever_calc[i][m] = False
        return False
    elif i == n:
        ever_calc[i][m] = False
        return False
    else:
        result = (solve(i+1, m) or solve(i+1, m-A[i]))
        ever_calc[i][m] = result
        return result solve global A if ever_calc[i][m] != None:
        return ever_calc[i][m]
     ever_calc[i][m] != None ever_calc[i][m] [i] ever_calc i m None return ever_calc[i][m] ever_calc[i][m] [i] ever_calc i m if m == 0:
        ever_calc[i][m] = True
        return True
    elif m < 0:
        ever_calc[i][m] = False
        return False
    elif i == n:
        ever_calc[i][m] = False
        return False
    else:
        result = (solve(i+1, m) or solve(i+1, m-A[i]))
        ever_calc[i][m] = result
        return result m == 0 m 0 ever_calc[i][m] = True ever_calc[i][m] [i] ever_calc i m True return True True elif m < 0:
        ever_calc[i][m] = False
        return False
     m < 0 m 0 ever_calc[i][m] = False ever_calc[i][m] [i] ever_calc i m False return False False elif i == n:
        ever_calc[i][m] = False
        return False
     i == n i n ever_calc[i][m] = False ever_calc[i][m] [i] ever_calc i m False return False False result = (solve(i+1, m) or solve(i+1, m-A[i])) result 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 ever_calc[i][m] = result ever_calc[i][m] [i] ever_calc i m result return result result i i m m n = int(input()) n int(input()) int input() input A = tuple(map(int, input().split())) A tuple(map(int, input().split())) tuple map(int, input().split()) map int input().split() ().split () input split q = int(input()) q int(input()) int input() input M = tuple(map(int, input().split())) M tuple(map(int, input().split())) tuple map(int, input().split()) map int input().split() ().split () input split sum_A = sum(A) sum_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 ever_calc = [[None] * 2000 for i in range(n+1)] ever_calc [[None] * 2000 for i in range(n+1)] for m in M:
    if m > sum_A:
        print('no')
    elif solve(0, m):
        print('yes')
    else:
        print('no') m M if m > sum_A:
        print('no')
    elif solve(0, m):
        print('yes')
    else:
        print('no') m > sum_A m sum_A print('no') print 'no' elif solve(0, m):
        print('yes')
     solve(0, m) solve 0 m print('yes') print 'yes' print('no') print 'no' q = int(input()) int(input()) q n = int(input()) int(input()) n A = tuple(map(int, input().split())) tuple(map(int, input().split())) A M = tuple(map(int, input().split())) tuple(map(int, input().split())) M sum_A = sum(A) sum(A) sum_A def solve(i, m):
    global A
    if ever_calc[i][m] != None:
        return ever_calc[i][m]
    if m == 0:
        ever_calc[i][m] = True
        return True
    elif m < 0:
        ever_calc[i][m] = False
        return False
    elif i == n:
        ever_calc[i][m] = False
        return False
    else:
        result = (solve(i+1, m) or solve(i+1, m-A[i]))
        ever_calc[i][m] = result
        return result def solve(i, m):
    global A
    if ever_calc[i][m] != None:
        return ever_calc[i][m]
    if m == 0:
        ever_calc[i][m] = True
        return True
    elif m < 0:
        ever_calc[i][m] = False
        return False
    elif i == n:
        ever_calc[i][m] = False
        return False
    else:
        result = (solve(i+1, m) or solve(i+1, m-A[i]))
        ever_calc[i][m] = result
        return result solve ever_calc = [[None] * 2000 for i in range(n+1)] [[None] * 2000 for i in range(n+1)] ever_calc
# coding=utf-8

def solve(i, m):
    global A
    if ever_calc[i][m] != None:
        return ever_calc[i][m]
    if m == 0:
        ever_calc[i][m] = True
        return True
    elif m < 0:
        ever_calc[i][m] = False
        return False
    elif i == n:
        ever_calc[i][m] = False
        return False
    else:
        result = (solve(i+1, m) or solve(i+1, m-A[i]))
        ever_calc[i][m] = result
        return result

n = int(input())
A = tuple(map(int, input().split()))
q = int(input())
M = tuple(map(int, input().split()))
sum_A = sum(A)
ever_calc = [[None] * 2000 for i in range(n+1)]

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