from functools import lru_cache

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


@lru_cache(maxsize=2**12)
def makeCombination(i,key):
    if key == 0:
        return True
    if i == n:
        return False
    return makeCombination(i+1,key) or makeCombination(i+1,key-A[i])


for m in M:
    if makeCombination(0,m):
        print("yes")
    else:
        print("no")
 from functools import lru_cache n = int(input()) n int(input()) int input() input int(n) for n in input().split() for n in input().split() n input().split() ().split () input split for n in input().split() int(n) int n A = [int(n) for n in input().split()] A [int(n) for n in input().split()] q = int(input()) q int(input()) int input() input int(n) for n in input().split() for n in input().split() n input().split() ().split () input split for n in input().split() int(n) int n M = [int(n) for n in input().split()] M [int(n) for n in input().split()] def makeCombination(i,key):
    if key == 0:
        return True
    if i == n:
        return False
    return makeCombination(i+1,key) or makeCombination(i+1,key-A[i]) makeCombination if key == 0:
        return True
     key == 0 key 0 return True True if i == n:
        return False
     i == n i n return False False return makeCombination(i+1,key) or makeCombination(i+1,key-A[i]) makeCombination(i+1,key) or makeCombination(i+1,key-A[i]) makeCombination(i+1,key) makeCombination i+1 i 1 key makeCombination(i+1,key-A[i]) makeCombination i+1 i 1 key-A[i] key A[i] A i i i key key @lru_cache(maxsize=2**12) makeCombination maxsize=2**12 @lru_cache(maxsize=2**12) lru_cache maxsize=2**12 maxsize 2**12 2 12 makeCombination for m in M:
    if makeCombination(0,m):
        print("yes")
    else:
        print("no") m M if makeCombination(0,m):
        print("yes")
    else:
        print("no") makeCombination(0,m) makeCombination 0 m print("yes") print "yes" print("no") print "no" n = int(input()) int(input()) n M = [int(n) for n in input().split()] [int(n) for n in input().split()] M A = [int(n) for n in input().split()] [int(n) for n in input().split()] A def makeCombination(i,key):
    if key == 0:
        return True
    if i == n:
        return False
    return makeCombination(i+1,key) or makeCombination(i+1,key-A[i]) def makeCombination(i,key):
    if key == 0:
        return True
    if i == n:
        return False
    return makeCombination(i+1,key) or makeCombination(i+1,key-A[i]) makeCombination q = int(input()) int(input()) q
from functools import lru_cache

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


@lru_cache(maxsize=2**12)
def makeCombination(i,key):
    if key == 0:
        return True
    if i == n:
        return False
    return makeCombination(i+1,key) or makeCombination(i+1,key-A[i])


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

