n=int(input())
S=[int(i) for i in input().split()]
q=int(input())
T=[int(i) for i in input().split()]


def solve(i,m,n,S):
    if sum(S)<m:
        return False
        
    if m==0:
        return True

    elif i>=n:
        return False
        
    res=solve(i+1,m,n,S) or solve(i+1,m-S[i],n,S)
    return res
    
for i in range(q):
    attempt=solve(0,T[i],n,S)
    if attempt:
        print("yes")
        
    else:
        print("no") n=int(input()) n int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i S=[int(i) for i in input().split()] S [int(i) for i in input().split()] q=int(input()) q int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i T=[int(i) for i in input().split()] T [int(i) for i in input().split()] def solve(i,m,n,S):
    if sum(S)<m:
        return False
        
    if m==0:
        return True

    elif i>=n:
        return False
        
    res=solve(i+1,m,n,S) or solve(i+1,m-S[i],n,S)
    return res
     solve if sum(S)<m:
        return False
        
     sum(S)<m sum(S) sum S m return False False if m==0:
        return True

    elif i>=n:
        return False
        
     m==0 m 0 return True True elif i>=n:
        return False
        
     i>=n i n return False False res=solve(i+1,m,n,S) or solve(i+1,m-S[i],n,S) res solve(i+1,m,n,S) or solve(i+1,m-S[i],n,S) solve(i+1,m,n,S) solve i+1 i 1 m n S solve(i+1,m-S[i],n,S) solve i+1 i 1 m-S[i] m S[i] S i n S return res res i i m m n n S S for i in range(q):
    attempt=solve(0,T[i],n,S)
    if attempt:
        print("yes")
        
    else:
        print("no") i range(q) range q attempt=solve(0,T[i],n,S) attempt solve(0,T[i],n,S) solve 0 T[i] T i n S if attempt:
        print("yes")
        
    else:
        print("no") attempt print("yes") print "yes" print("no") print "no" q=int(input()) int(input()) q n=int(input()) int(input()) n attempt=solve(0,T[i],n,S) solve(0,T[i],n,S) attempt S=[int(i) for i in input().split()] [int(i) for i in input().split()] S def solve(i,m,n,S):
    if sum(S)<m:
        return False
        
    if m==0:
        return True

    elif i>=n:
        return False
        
    res=solve(i+1,m,n,S) or solve(i+1,m-S[i],n,S)
    return res
     def solve(i,m,n,S):
    if sum(S)<m:
        return False
        
    if m==0:
        return True

    elif i>=n:
        return False
        
    res=solve(i+1,m,n,S) or solve(i+1,m-S[i],n,S)
    return res
     solve T=[int(i) for i in input().split()] [int(i) for i in input().split()] T
n=int(input())
S=[int(i) for i in input().split()]
q=int(input())
T=[int(i) for i in input().split()]


def solve(i,m,n,S):
    if sum(S)<m:
        return False
        
    if m==0:
        return True

    elif i>=n:
        return False
        
    res=solve(i+1,m,n,S) or solve(i+1,m-S[i],n,S)
    return res
    
for i in range(q):
    attempt=solve(0,T[i],n,S)
    if attempt:
        print("yes")
        
    else:
        print("no")
