#!/usr/bin/env python
# -*- coding:utf-8 -*-
from __future__ import print_function,division
from itertools import combinations
import time
import sys
import io
import re
import math
start = time.clock()
i = 0
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

sys.stdin.readline()
a=[int(s) for s in sys.stdin.readline().split()]
sys.stdin.readline()
ms=[int(s) for s in sys.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 print_function,division from itertools import combinations import time time import sys sys import io io import re re import math math start = time.clock() start time.clock() time.clock time clock i = 0 i 0 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 sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline int(s) for s in sys.stdin.readline().split() for s in sys.stdin.readline().split() s sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split for s in sys.stdin.readline().split() int(s) int s a=[int(s) for s in sys.stdin.readline().split()] a [int(s) for s in sys.stdin.readline().split()] sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline int(s) for s in sys.stdin.readline().split() for s in sys.stdin.readline().split() s sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split for s in sys.stdin.readline().split() int(s) int s ms=[int(s) for s in sys.stdin.readline().split()] ms [int(s) for s in sys.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' i = 0 0 i 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 start = time.clock() time.clock() start a=[int(s) for s in sys.stdin.readline().split()] [int(s) for s in sys.stdin.readline().split()] a ms=[int(s) for s in sys.stdin.readline().split()] [int(s) for s in sys.stdin.readline().split()] ms sets={s for s in enum_sum_numbers(a,len(a),1)} sets
#!/usr/bin/env python
# -*- coding:utf-8 -*-
from __future__ import print_function,division
from itertools import combinations
import time
import sys
import io
import re
import math
start = time.clock()
i = 0
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

sys.stdin.readline()
a=[int(s) for s in sys.stdin.readline().split()]
sys.stdin.readline()
ms=[int(s) for s in sys.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')