def solve(n,A):
    x=pow(2,n)
    dp=[False]*2001
    for i in range(x):
        count=0
        for j in range(n):
            if (i>>j)&1:
                count+=A[j]
        if count<=2000:
            dp[count]=True
    return dp

n=int(input())
A=list(map(int,input().split()))
q=int(input())
m=list(map(int,input().split()))
ans=solve(n,A)
for i in range(q):
    if ans[m[i]]:
        print("yes")
    else:
        print("no") def solve(n,A):
    x=pow(2,n)
    dp=[False]*2001
    for i in range(x):
        count=0
        for j in range(n):
            if (i>>j)&1:
                count+=A[j]
        if count<=2000:
            dp[count]=True
    return dp solve x=pow(2,n) x pow(2,n) pow 2 n dp=[False]*2001 dp [False]*2001 [False] False 2001 for i in range(x):
        count=0
        for j in range(n):
            if (i>>j)&1:
                count+=A[j]
        if count<=2000:
            dp[count]=True
     i range(x) range x count=0 count 0 for j in range(n):
            if (i>>j)&1:
                count+=A[j]
         j range(n) range n if (i>>j)&1:
                count+=A[j]
         (i>>j)&1 i>>j i j 1 count+=A[j] count A[j] A j if count<=2000:
            dp[count]=True
     count<=2000 count 2000 dp[count]=True dp[count] dp count True return dp dp n n A A 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 ans=solve(n,A) ans solve(n,A) solve n A for i in range(q):
    if ans[m[i]]:
        print("yes")
    else:
        print("no") i range(q) range q if ans[m[i]]:
        print("yes")
    else:
        print("no") ans[m[i]] ans m[i] m i print("yes") print "yes" print("no") print "no" A=list(map(int,input().split())) list(map(int,input().split())) A ans=solve(n,A) solve(n,A) ans m=list(map(int,input().split())) list(map(int,input().split())) m n=int(input()) int(input()) n def solve(n,A):
    x=pow(2,n)
    dp=[False]*2001
    for i in range(x):
        count=0
        for j in range(n):
            if (i>>j)&1:
                count+=A[j]
        if count<=2000:
            dp[count]=True
    return dp def solve(n,A):
    x=pow(2,n)
    dp=[False]*2001
    for i in range(x):
        count=0
        for j in range(n):
            if (i>>j)&1:
                count+=A[j]
        if count<=2000:
            dp[count]=True
    return dp solve q=int(input()) int(input()) q
def solve(n,A):
    x=pow(2,n)
    dp=[False]*2001
    for i in range(x):
        count=0
        for j in range(n):
            if (i>>j)&1:
                count+=A[j]
        if count<=2000:
            dp[count]=True
    return dp

n=int(input())
A=list(map(int,input().split()))
q=int(input())
m=list(map(int,input().split()))
ans=solve(n,A)
for i in range(q):
    if ans[m[i]]:
        print("yes")
    else:
        print("no")
