import sys
input = sys.stdin.readline

n = int(input())
A = tuple(int(x) for x in input().split())
_ = int(input())
M = tuple(int(x) for x in input().split())

S = set()
def Check(i, s):
    if i == n:
        S.add(s)
        return
    Check(i + 1, s + A[i])
    Check(i + 1, s)

Check(0, 0)

for m in M:
    if m in S:
        print('yes')
    else:
        print('no') import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline n = int(input()) n int(input()) int input() input A = tuple(int(x) for x in input().split()) A tuple(int(x) for x in input().split()) tuple int(x) int x _ = int(input()) _ int(input()) int input() input M = tuple(int(x) for x in input().split()) M tuple(int(x) for x in input().split()) tuple int(x) int x S = set() S set() set def Check(i, s):
    if i == n:
        S.add(s)
        return
    Check(i + 1, s + A[i])
    Check(i + 1, s) Check if i == n:
        S.add(s)
        return
     i == n i n S.add(s) S.add S add s return Check(i + 1, s + A[i]) Check i + 1 i 1 s + A[i] s A[i] A i Check(i + 1, s) Check i + 1 i 1 s i i s s Check(0, 0) Check 0 0 for m in M:
    if m in S:
        print('yes')
    else:
        print('no') m M if m in S:
        print('yes')
    else:
        print('no') m in S m S print('yes') print 'yes' print('no') print 'no' input = sys.stdin.readline sys.stdin.readline input n = int(input()) int(input()) n M = tuple(int(x) for x in input().split()) tuple(int(x) for x in input().split()) M A = tuple(int(x) for x in input().split()) tuple(int(x) for x in input().split()) A S = set() set() S def Check(i, s):
    if i == n:
        S.add(s)
        return
    Check(i + 1, s + A[i])
    Check(i + 1, s) def Check(i, s):
    if i == n:
        S.add(s)
        return
    Check(i + 1, s + A[i])
    Check(i + 1, s) Check _ = int(input()) int(input()) _
import sys
input = sys.stdin.readline

n = int(input())
A = tuple(int(x) for x in input().split())
_ = int(input())
M = tuple(int(x) for x in input().split())

S = set()
def Check(i, s):
    if i == n:
        S.add(s)
        return
    Check(i + 1, s + A[i])
    Check(i + 1, s)

Check(0, 0)

for m in M:
    if m in S:
        print('yes')
    else:
        print('no')
