#!/usr/bin/env python
from __future__ import division, print_function
from sys import stdin
from itertools import combinations


def enum_sum_numbers(sets, s_range, r):
    for cmb in combinations(sets, r):
        yield sum(cmb)
    if r <= s_range:
        for s in enum_sum_numbers(sets, s_range, r+1):
            yield s


stdin.readline()
a = [int(s) for s in stdin.readline().split()]
stdin.readline()
ms = [int(s) for s in stdin.readline().split()]
sets = {s for s in enum_sum_numbers(a, len(a), 1)}

for m in ms:
    print('yes' if m in sets else 'no') from __future__ import division, print_function from sys import stdin from itertools import combinations def enum_sum_numbers(sets, s_range, r):
    for cmb in combinations(sets, r):
        yield sum(cmb)
    if r <= s_range:
        for s in enum_sum_numbers(sets, s_range, r+1):
            yield s enum_sum_numbers for cmb in combinations(sets, r):
        yield sum(cmb)
     cmb combinations(sets, r) combinations sets r yield sum(cmb) sum(cmb) sum cmb if r <= s_range:
        for s in enum_sum_numbers(sets, s_range, r+1):
            yield s r <= s_range r s_range for s in enum_sum_numbers(sets, s_range, r+1):
            yield s s enum_sum_numbers(sets, s_range, r+1) enum_sum_numbers sets s_range r+1 r 1 yield s s sets sets s_range s_range r r stdin.readline() stdin.readline stdin readline int(s) for s in stdin.readline().split() for s in stdin.readline().split() s stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split for s in stdin.readline().split() int(s) int s a = [int(s) for s in stdin.readline().split()] a [int(s) for s in stdin.readline().split()] stdin.readline() stdin.readline stdin readline int(s) for s in stdin.readline().split() for s in stdin.readline().split() s stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split for s in stdin.readline().split() int(s) int s ms = [int(s) for s in stdin.readline().split()] ms [int(s) for s in stdin.readline().split()] s for s in enum_sum_numbers(a, len(a), 1) for s in enum_sum_numbers(a, len(a), 1) s enum_sum_numbers(a, len(a), 1) enum_sum_numbers a len(a) len a 1 for s in enum_sum_numbers(a, len(a), 1) s sets = {s for s in enum_sum_numbers(a, len(a), 1)} sets for m in ms:
    print('yes' if m in sets else 'no') m ms print('yes' if m in sets else 'no') print 'yes' if m in sets else 'no' m in sets m sets 'yes' 'no' sets = {s for s in enum_sum_numbers(a, len(a), 1)} sets a = [int(s) for s in stdin.readline().split()] [int(s) for s in stdin.readline().split()] a def enum_sum_numbers(sets, s_range, r):
    for cmb in combinations(sets, r):
        yield sum(cmb)
    if r <= s_range:
        for s in enum_sum_numbers(sets, s_range, r+1):
            yield s def enum_sum_numbers(sets, s_range, r):
    for cmb in combinations(sets, r):
        yield sum(cmb)
    if r <= s_range:
        for s in enum_sum_numbers(sets, s_range, r+1):
            yield s enum_sum_numbers ms = [int(s) for s in stdin.readline().split()] [int(s) for s in stdin.readline().split()] ms
#!/usr/bin/env python
from __future__ import division, print_function
from sys import stdin
from itertools import combinations


def enum_sum_numbers(sets, s_range, r):
    for cmb in combinations(sets, r):
        yield sum(cmb)
    if r <= s_range:
        for s in enum_sum_numbers(sets, s_range, r+1):
            yield s


stdin.readline()
a = [int(s) for s in stdin.readline().split()]
stdin.readline()
ms = [int(s) for s in stdin.readline().split()]
sets = {s for s in enum_sum_numbers(a, len(a), 1)}

for m in ms:
    print('yes' if m in sets else 'no')