import sys
def input():
    return sys.stdin.readline()[:-1]

n  = int(input())
A = list(map(int, input().split()))
q  = int(input())
M = list(map(int, input().split()))

def solve(dp, n,A, i,m):
    if m==0:
        return True
    
    elif i>=n:
        return False
    
    elif dp[i][m] is not None:
        return dp[i][m]
    
    elif solve(dp,n,A, i+1,m):
        dp[i][m] = True
        return True
    
    elif m-A[i]>=0:
        dp[i][m] = solve(dp,n,A, i+1,m-A[i])
        return dp[i][m]
    
    else:
        dp[i][m]= False
        return False
    

dp = [[None for i in range(max(M)+1)] for j in range(n+1)]

for m in M:    
    if solve(dp, n,A, 0, m):
        print('yes')
    else:
        print('no') import sys sys def input():
    return sys.stdin.readline()[:-1] input return sys.stdin.readline()[:-1] sys.stdin.readline()[:-1] sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline :-1 -1 n  = int(input()) n int(input()) int input() input A = list(map(int, input().split())) A list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split q  = int(input()) q int(input()) int input() input M = list(map(int, input().split())) M list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def solve(dp, n,A, i,m):
    if m==0:
        return True
    
    elif i>=n:
        return False
    
    elif dp[i][m] is not None:
        return dp[i][m]
    
    elif solve(dp,n,A, i+1,m):
        dp[i][m] = True
        return True
    
    elif m-A[i]>=0:
        dp[i][m] = solve(dp,n,A, i+1,m-A[i])
        return dp[i][m]
    
    else:
        dp[i][m]= False
        return False
     solve if m==0:
        return True
    
    elif i>=n:
        return False
    
    elif dp[i][m] is not None:
        return dp[i][m]
    
    elif solve(dp,n,A, i+1,m):
        dp[i][m] = True
        return True
    
    elif m-A[i]>=0:
        dp[i][m] = solve(dp,n,A, i+1,m-A[i])
        return dp[i][m]
    
    else:
        dp[i][m]= False
        return False
     m==0 m 0 return True True elif i>=n:
        return False
    
     i>=n i n return False False elif dp[i][m] is not None:
        return dp[i][m]
    
     dp[i][m] is not None dp[i][m] [i] dp i m None return dp[i][m] dp[i][m] [i] dp i m elif solve(dp,n,A, i+1,m):
        dp[i][m] = True
        return True
    
     solve(dp,n,A, i+1,m) solve dp n A i+1 i 1 m dp[i][m] = True dp[i][m] [i] dp i m True return True True elif m-A[i]>=0:
        dp[i][m] = solve(dp,n,A, i+1,m-A[i])
        return dp[i][m]
    
     m-A[i]>=0 m-A[i] m A[i] A i 0 dp[i][m] = solve(dp,n,A, i+1,m-A[i]) dp[i][m] [i] dp i m solve(dp,n,A, i+1,m-A[i]) solve dp n A i+1 i 1 m-A[i] m A[i] A i return dp[i][m] dp[i][m] [i] dp i m dp[i][m]= False dp[i][m] [i] dp i m False return False False dp dp n n A A i i m m [None for i in range(max(M)+1)] for j in range(n+1) for j in range(n+1) j range(n+1) range n+1 n 1 for j in range(n+1) [None for i in range(max(M)+1)] dp = [[None for i in range(max(M)+1)] for j in range(n+1)] dp [[None for i in range(max(M)+1)] for j in range(n+1)] for m in M:    
    if solve(dp, n,A, 0, m):
        print('yes')
    else:
        print('no') m M if solve(dp, n,A, 0, m):
        print('yes')
    else:
        print('no') solve(dp, n,A, 0, m) solve dp n A 0 m print('yes') print 'yes' print('no') print 'no' n  = int(input()) int(input()) n q  = int(input()) int(input()) q M = list(map(int, input().split())) list(map(int, input().split())) M def input():
    return sys.stdin.readline()[:-1] def input():
    return sys.stdin.readline()[:-1] input def solve(dp, n,A, i,m):
    if m==0:
        return True
    
    elif i>=n:
        return False
    
    elif dp[i][m] is not None:
        return dp[i][m]
    
    elif solve(dp,n,A, i+1,m):
        dp[i][m] = True
        return True
    
    elif m-A[i]>=0:
        dp[i][m] = solve(dp,n,A, i+1,m-A[i])
        return dp[i][m]
    
    else:
        dp[i][m]= False
        return False
     def solve(dp, n,A, i,m):
    if m==0:
        return True
    
    elif i>=n:
        return False
    
    elif dp[i][m] is not None:
        return dp[i][m]
    
    elif solve(dp,n,A, i+1,m):
        dp[i][m] = True
        return True
    
    elif m-A[i]>=0:
        dp[i][m] = solve(dp,n,A, i+1,m-A[i])
        return dp[i][m]
    
    else:
        dp[i][m]= False
        return False
     solve A = list(map(int, input().split())) list(map(int, input().split())) A dp = [[None for i in range(max(M)+1)] for j in range(n+1)] [[None for i in range(max(M)+1)] for j in range(n+1)] dp
import sys
def input():
    return sys.stdin.readline()[:-1]

n  = int(input())
A = list(map(int, input().split()))
q  = int(input())
M = list(map(int, input().split()))

def solve(dp, n,A, i,m):
    if m==0:
        return True
    
    elif i>=n:
        return False
    
    elif dp[i][m] is not None:
        return dp[i][m]
    
    elif solve(dp,n,A, i+1,m):
        dp[i][m] = True
        return True
    
    elif m-A[i]>=0:
        dp[i][m] = solve(dp,n,A, i+1,m-A[i])
        return dp[i][m]
    
    else:
        dp[i][m]= False
        return False
    

dp = [[None for i in range(max(M)+1)] for j in range(n+1)]

for m in M:    
    if solve(dp, n,A, 0, m):
        print('yes')
    else:
        print('no')
