n = int(input())                                                                                                                                                                                                                              
A = list(map(int, input().split()))                                                                                                                                                                                      
q = int(input())                                                                                                                                                                                                                              
M = list(map(int, input().split()))                                                                                                                                                                                      
                                                                                                                                                                                                                                              
possible = set()                                                                                                                                                                                                         
                                                                                                                                                                                                                                              
for i in range(2**n):                                                                                                                                                                                                    
    s = 0                                                                                                                                                                                                                                     
    for j in range(n):                                                                                                                                                                                                   
        if i & (1 << j):                                                                                                                                                                                                                      
            s += A[j]                                                                                                                                                                                                    
    possible.add(s)                                                                                                                                                                                                                           
                                                                                                                                                                                                                         
for m in M:                                                                                                                                                                                                                                   
    if m in possible:                                                                                                                                                                                                    
        print("yes")                                                                                                                                                                                                                          
    else:                                                                                                                                                                                                                
        print("no")      


Measured memory_bytes: 5648