import bisect
n = int(input())
A = tuple(map(int,input().split()))
q = int(input())
Q = tuple(map(int, input().split()))
dp = [0]*(2**n)

for i in range(n):
    for j in range(1<<i):
        dp[j+(1<<i)] = dp[j] + A[i]
dp.sort()

for n in Q:
    i = bisect.bisect(dp, n)
    print("yes" if i>0 and n==dp[i-1] else "no") import bisect bisect 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 Q = tuple(map(int, input().split())) Q tuple(map(int, input().split())) tuple map(int, input().split()) map int input().split() ().split () input split dp = [0]*(2**n) dp [0]*(2**n) [0] 0 2**n 2 n for i in range(n):
    for j in range(1<<i):
        dp[j+(1<<i)] = dp[j] + A[i] i range(n) range n for j in range(1<<i):
        dp[j+(1<<i)] = dp[j] + A[i] j range(1<<i) range 1<<i 1 i dp[j+(1<<i)] = dp[j] + A[i] dp[j+(1<<i)] dp j+(1<<i) j 1<<i 1 i dp[j] + A[i] dp[j] dp j A[i] A i dp.sort() dp.sort dp sort for n in Q:
    i = bisect.bisect(dp, n)
    print("yes" if i>0 and n==dp[i-1] else "no") n Q i = bisect.bisect(dp, n) i bisect.bisect(dp, n) bisect.bisect bisect bisect dp n print("yes" if i>0 and n==dp[i-1] else "no") print "yes" if i>0 and n==dp[i-1] else "no" i>0 and n==dp[i-1] i>0 i 0 n==dp[i-1] n dp[i-1] dp i-1 i 1 "yes" "no" q = int(input()) int(input()) q n = int(input()) int(input()) n Q = tuple(map(int, input().split())) tuple(map(int, input().split())) Q dp = [0]*(2**n) [0]*(2**n) dp i = bisect.bisect(dp, n) bisect.bisect(dp, n) i A = tuple(map(int,input().split())) tuple(map(int,input().split())) A
import bisect
n = int(input())
A = tuple(map(int,input().split()))
q = int(input())
Q = tuple(map(int, input().split()))
dp = [0]*(2**n)

for i in range(n):
    for j in range(1<<i):
        dp[j+(1<<i)] = dp[j] + A[i]
dp.sort()

for n in Q:
    i = bisect.bisect(dp, n)
    print("yes" if i>0 and n==dp[i-1] else "no")