import sys

n = int(sys.stdin.readline())
A = [int(x) for x in sys.stdin.readline().split()]
q = int(sys.stdin.readline())
Qs = [int(x) for x in sys.stdin.readline().split()]

l = len(A)
N = 2000
dp = [False] * (N+1)
dp[0] = True

for a in A:
    tmp = dp.copy()
    for j in range(N+1):
        if j + a > N:break

        if tmp[j]:
            dp[j+a] = True

for m in Qs:
    if dp[m]:
        print("yes")
    else:
        print("no") import sys sys n = int(sys.stdin.readline()) n int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline int(x) for x in sys.stdin.readline().split() for x in sys.stdin.readline().split() x sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split for x in sys.stdin.readline().split() int(x) int x A = [int(x) for x in sys.stdin.readline().split()] A [int(x) for x in sys.stdin.readline().split()] q = int(sys.stdin.readline()) q int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline int(x) for x in sys.stdin.readline().split() for x in sys.stdin.readline().split() x sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split for x in sys.stdin.readline().split() int(x) int x Qs = [int(x) for x in sys.stdin.readline().split()] Qs [int(x) for x in sys.stdin.readline().split()] l = len(A) l len(A) len A N = 2000 N 2000 dp = [False] * (N+1) dp [False] * (N+1) [False] False N+1 N 1 dp[0] = True dp[0] dp 0 True for a in A:
    tmp = dp.copy()
    for j in range(N+1):
        if j + a > N:break

        if tmp[j]:
            dp[j+a] = True a A tmp = dp.copy() tmp dp.copy() dp.copy dp copy for j in range(N+1):
        if j + a > N:break

        if tmp[j]:
            dp[j+a] = True j range(N+1) range N+1 N 1 if j + a > N:break

         j + a > N j + a j a N if tmp[j]:
            dp[j+a] = True tmp[j] tmp j dp[j+a] = True dp[j+a] dp j+a j a True for m in Qs:
    if dp[m]:
        print("yes")
    else:
        print("no") m Qs if dp[m]:
        print("yes")
    else:
        print("no") dp[m] dp m print("yes") print "yes" print("no") print "no" n = int(sys.stdin.readline()) int(sys.stdin.readline()) n q = int(sys.stdin.readline()) int(sys.stdin.readline()) q Qs = [int(x) for x in sys.stdin.readline().split()] [int(x) for x in sys.stdin.readline().split()] Qs N = 2000 2000 N tmp = dp.copy() dp.copy() tmp dp = [False] * (N+1) [False] * (N+1) dp A = [int(x) for x in sys.stdin.readline().split()] [int(x) for x in sys.stdin.readline().split()] A l = len(A) len(A) l
import sys

n = int(sys.stdin.readline())
A = [int(x) for x in sys.stdin.readline().split()]
q = int(sys.stdin.readline())
Qs = [int(x) for x in sys.stdin.readline().split()]

l = len(A)
N = 2000
dp = [False] * (N+1)
dp[0] = True

for a in A:
    tmp = dp.copy()
    for j in range(N+1):
        if j + a > N:break

        if tmp[j]:
            dp[j+a] = True

for m in Qs:
    if dp[m]:
        print("yes")
    else:
        print("no")
