import sys
from sys import stdin
input = stdin.readline

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

dp = [[-1 for i in range(2001)] for j in range(21)]

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

for m in M:
    if solve(0,m):
        print("yes")
    else:
        print("no") import sys sys from sys import stdin input = stdin.readline input stdin.readline stdin readline 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()] 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()] [-1 for i in range(2001)] for j in range(21) for j in range(21) j range(21) range 21 for j in range(21) [-1 for i in range(2001)] dp = [[-1 for i in range(2001)] for j in range(21)] dp [[-1 for i in range(2001)] for j in range(21)] def solve(i,m):
    if dp[i][m] != -1:
        return dp[i][m]
    if m == 0:
        dp[i][m] = True
    elif i >= n:
        dp[i][m] = False
    elif solve(i+1,m):
        dp[i][m] = True
    elif solve (i+1, m-A[i]):
        dp[i][m] = True
    else:
        dp[i][m] = False
    return dp[i][m] solve if dp[i][m] != -1:
        return dp[i][m]
     dp[i][m] != -1 dp[i][m] [i] dp i m -1 return dp[i][m] dp[i][m] [i] dp i m if m == 0:
        dp[i][m] = True
    elif i >= n:
        dp[i][m] = False
    elif solve(i+1,m):
        dp[i][m] = True
    elif solve (i+1, m-A[i]):
        dp[i][m] = True
    else:
        dp[i][m] = False
     m == 0 m 0 dp[i][m] = True dp[i][m] [i] dp i m True elif i >= n:
        dp[i][m] = False
     i >= n i n dp[i][m] = False dp[i][m] [i] dp i m False elif solve(i+1,m):
        dp[i][m] = True
     solve(i+1,m) solve i+1 i 1 m dp[i][m] = True dp[i][m] [i] dp i m True elif solve (i+1, m-A[i]):
        dp[i][m] = True
     solve (i+1, m-A[i]) solve i+1 i 1 m-A[i] m A[i] A i dp[i][m] = True dp[i][m] [i] dp i m True dp[i][m] = False dp[i][m] [i] dp i m False return dp[i][m] dp[i][m] [i] dp i m i i m m for m in M:
    if solve(0,m):
        print("yes")
    else:
        print("no") m M if solve(0,m):
        print("yes")
    else:
        print("no") solve(0,m) solve 0 m print("yes") print "yes" print("no") print "no" q = int(input()) int(input()) q dp = [[-1 for i in range(2001)] for j in range(21)] [[-1 for i in range(2001)] for j in range(21)] dp A =[int(x) for x in input().split()] [int(x) for x in input().split()] A n = int(input()) int(input()) n def solve(i,m):
    if dp[i][m] != -1:
        return dp[i][m]
    if m == 0:
        dp[i][m] = True
    elif i >= n:
        dp[i][m] = False
    elif solve(i+1,m):
        dp[i][m] = True
    elif solve (i+1, m-A[i]):
        dp[i][m] = True
    else:
        dp[i][m] = False
    return dp[i][m] def solve(i,m):
    if dp[i][m] != -1:
        return dp[i][m]
    if m == 0:
        dp[i][m] = True
    elif i >= n:
        dp[i][m] = False
    elif solve(i+1,m):
        dp[i][m] = True
    elif solve (i+1, m-A[i]):
        dp[i][m] = True
    else:
        dp[i][m] = False
    return dp[i][m] solve input = stdin.readline stdin.readline input M =[int(x) for x in input().split()] [int(x) for x in input().split()] M
import sys
from sys import stdin
input = stdin.readline

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

dp = [[-1 for i in range(2001)] for j in range(21)]

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

for m in M:
    if solve(0,m):
        print("yes")
    else:
        print("no")
