import sys
sys.setrecursionlimit(100000)  # set the maximum depth as 10000

n=int(input())
A=[int(x) for x in input().split()]
minA=min(A)
sumA=0
for i in A:
    sumA+=i
    


q=int(input())
M=[int(x) for x in input().split()]


def solve(i,m):
    global n
    global A
    global minA
    global sumA
    
    if m<0 or m>sumA:
        return False
    if m==0:
        return True
    if i>=n:
        return False
    
    return solve(i+1,m) or solve(i+1,m-A[i])
    
    
for m in M:
    if m<minA or m>sumA:
        print('no')
    else:
        if solve(0,m):
            print('yes')
        else:
            print('no') import sys sys sys.setrecursionlimit(100000) sys.setrecursionlimit sys setrecursionlimit 100000 n=int(input()) n int(input()) int input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x A=[int(x) for x in input().split()] A [int(x) for x in input().split()] minA=min(A) minA min(A) min A sumA=0 sumA 0 for i in A:
    sumA+=i
     i A sumA+=i sumA i q=int(input()) q int(input()) int input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x M=[int(x) for x in input().split()] M [int(x) for x in input().split()] def solve(i,m):
    global n
    global A
    global minA
    global sumA
    
    if m<0 or m>sumA:
        return False
    if m==0:
        return True
    if i>=n:
        return False
    
    return solve(i+1,m) or solve(i+1,m-A[i])
    
     solve global n global A global minA global sumA if m<0 or m>sumA:
        return False
     m<0 or m>sumA m<0 m 0 m>sumA m sumA return False False if m==0:
        return True
     m==0 m 0 return True True if i>=n:
        return False
    
     i>=n i n return False False return solve(i+1,m) or solve(i+1,m-A[i]) solve(i+1,m) or solve(i+1,m-A[i]) solve(i+1,m) solve i+1 i 1 m solve(i+1,m-A[i]) solve i+1 i 1 m-A[i] m A[i] A i i i m m for m in M:
    if m<minA or m>sumA:
        print('no')
    else:
        if solve(0,m):
            print('yes')
        else:
            print('no') m M if m<minA or m>sumA:
        print('no')
    else:
        if solve(0,m):
            print('yes')
        else:
            print('no') m<minA or m>sumA m<minA m minA m>sumA m sumA print('no') print 'no' if solve(0,m):
            print('yes')
        else:
            print('no') solve(0,m) solve 0 m print('yes') print 'yes' print('no') print 'no' sumA=0 0 sumA M=[int(x) for x in input().split()] [int(x) for x in input().split()] M A=[int(x) for x in input().split()] [int(x) for x in input().split()] A n=int(input()) int(input()) n sumA+=i i sumA def solve(i,m):
    global n
    global A
    global minA
    global sumA
    
    if m<0 or m>sumA:
        return False
    if m==0:
        return True
    if i>=n:
        return False
    
    return solve(i+1,m) or solve(i+1,m-A[i])
    
     def solve(i,m):
    global n
    global A
    global minA
    global sumA
    
    if m<0 or m>sumA:
        return False
    if m==0:
        return True
    if i>=n:
        return False
    
    return solve(i+1,m) or solve(i+1,m-A[i])
    
     solve minA=min(A) min(A) minA q=int(input()) int(input()) q
import sys
sys.setrecursionlimit(100000)  # set the maximum depth as 10000

n=int(input())
A=[int(x) for x in input().split()]
minA=min(A)
sumA=0
for i in A:
    sumA+=i
    


q=int(input())
M=[int(x) for x in input().split()]


def solve(i,m):
    global n
    global A
    global minA
    global sumA
    
    if m<0 or m>sumA:
        return False
    if m==0:
        return True
    if i>=n:
        return False
    
    return solve(i+1,m) or solve(i+1,m-A[i])
    
    
for m in M:
    if m<minA or m>sumA:
        print('no')
    else:
        if solve(0,m):
            print('yes')
        else:
            print('no')
