# -*- coding: utf-8 -*-

import random
import sys
import os
import pprint

#fd = os.open('ALDS1_5_A.txt', os.O_RDONLY)
#os.dup2(fd, sys.stdin.fileno())

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

# memo table T[i][m]
row_num = len(A)
column_num = 2000
T = [[None for i in range(column_num)] for j in range(row_num)]
#pprint.pprint(T)


def solve(i, m):
    # out of index
    if i >= len(A):
        return False
    if m < 0:
        return False

    if T[i][m] is not None:
        return T[i][m]

    if m == 0:
        T[i][m] = True
    elif m == A[i]:
        T[i][m] = True
    #elif i >= len(A):
    #    T[i][m] = False
    elif solve(i+1, m):
        T[i][m] = True
    elif solve(i+1, m - A[i]):
        T[i][m] = True
    else:
        T[i][m] = False
    return T[i][m]

test_num = int(input())
test_values = map(int, input().split())
for v in test_values:
    result = solve(0, v)
    if result is True:
        print('yes')
    else:
        print('no') import random random import sys sys import os os import pprint pprint 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 row_num = len(A) row_num len(A) len A column_num = 2000 column_num 2000 [None for i in range(column_num)] for j in range(row_num) for j in range(row_num) j range(row_num) range row_num for j in range(row_num) [None for i in range(column_num)] T = [[None for i in range(column_num)] for j in range(row_num)] T [[None for i in range(column_num)] for j in range(row_num)] def solve(i, m):
    # out of index
    if i >= len(A):
        return False
    if m < 0:
        return False

    if T[i][m] is not None:
        return T[i][m]

    if m == 0:
        T[i][m] = True
    elif m == A[i]:
        T[i][m] = True
    #elif i >= len(A):
    #    T[i][m] = False
    elif solve(i+1, m):
        T[i][m] = True
    elif solve(i+1, m - A[i]):
        T[i][m] = True
    else:
        T[i][m] = False
    return T[i][m] solve if i >= len(A):
        return False
     i >= len(A) i len(A) len A return False False if m < 0:
        return False

     m < 0 m 0 return False False if T[i][m] is not None:
        return T[i][m]

     T[i][m] is not None T[i][m] [i] T i m None return T[i][m] T[i][m] [i] T i m if m == 0:
        T[i][m] = True
    elif m == A[i]:
        T[i][m] = True
    #elif i >= len(A):
    #    T[i][m] = False
    elif solve(i+1, m):
        T[i][m] = True
    elif solve(i+1, m - A[i]):
        T[i][m] = True
    else:
        T[i][m] = False
     m == 0 m 0 T[i][m] = True T[i][m] [i] T i m True elif m == A[i]:
        T[i][m] = True
    #elif i >= len(A):
    #    T[i][m] = False
     m == A[i] m A[i] A i T[i][m] = True T[i][m] [i] T i m True elif solve(i+1, m):
        T[i][m] = True
     solve(i+1, m) solve i+1 i 1 m T[i][m] = True T[i][m] [i] T i m True elif solve(i+1, m - A[i]):
        T[i][m] = True
     solve(i+1, m - A[i]) solve i+1 i 1 m - A[i] m A[i] A i T[i][m] = True T[i][m] [i] T i m True T[i][m] = False T[i][m] [i] T i m False return T[i][m] T[i][m] [i] T i m i i m m test_num = int(input()) test_num int(input()) int input() input test_values = map(int, input().split()) test_values map(int, input().split()) map int input().split() ().split () input split for v in test_values:
    result = solve(0, v)
    if result is True:
        print('yes')
    else:
        print('no') v test_values result = solve(0, v) result solve(0, v) solve 0 v if result is True:
        print('yes')
    else:
        print('no') result is True result True print('yes') print 'yes' print('no') print 'no' test_num = int(input()) int(input()) test_num result = solve(0, v) solve(0, v) result column_num = 2000 2000 column_num test_values = map(int, input().split()) map(int, input().split()) test_values n = int(input()) int(input()) n row_num = len(A) len(A) row_num A = list(map(int, input().split())) list(map(int, input().split())) A T = [[None for i in range(column_num)] for j in range(row_num)] [[None for i in range(column_num)] for j in range(row_num)] T def solve(i, m):
    # out of index
    if i >= len(A):
        return False
    if m < 0:
        return False

    if T[i][m] is not None:
        return T[i][m]

    if m == 0:
        T[i][m] = True
    elif m == A[i]:
        T[i][m] = True
    #elif i >= len(A):
    #    T[i][m] = False
    elif solve(i+1, m):
        T[i][m] = True
    elif solve(i+1, m - A[i]):
        T[i][m] = True
    else:
        T[i][m] = False
    return T[i][m] def solve(i, m):
    # out of index
    if i >= len(A):
        return False
    if m < 0:
        return False

    if T[i][m] is not None:
        return T[i][m]

    if m == 0:
        T[i][m] = True
    elif m == A[i]:
        T[i][m] = True
    #elif i >= len(A):
    #    T[i][m] = False
    elif solve(i+1, m):
        T[i][m] = True
    elif solve(i+1, m - A[i]):
        T[i][m] = True
    else:
        T[i][m] = False
    return T[i][m] solve
# -*- coding: utf-8 -*-

import random
import sys
import os
import pprint

#fd = os.open('ALDS1_5_A.txt', os.O_RDONLY)
#os.dup2(fd, sys.stdin.fileno())

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

# memo table T[i][m]
row_num = len(A)
column_num = 2000
T = [[None for i in range(column_num)] for j in range(row_num)]
#pprint.pprint(T)


def solve(i, m):
    # out of index
    if i >= len(A):
        return False
    if m < 0:
        return False

    if T[i][m] is not None:
        return T[i][m]

    if m == 0:
        T[i][m] = True
    elif m == A[i]:
        T[i][m] = True
    #elif i >= len(A):
    #    T[i][m] = False
    elif solve(i+1, m):
        T[i][m] = True
    elif solve(i+1, m - A[i]):
        T[i][m] = True
    else:
        T[i][m] = False
    return T[i][m]

test_num = int(input())
test_values = map(int, input().split())
for v in test_values:
    result = solve(0, v)
    if result is True:
        print('yes')
    else:
        print('no')