from functools import lru_cache

@lru_cache(maxsize = 10000)
def canProd(i,m):
     
    if m == 0:
        return True
    if i >= n:
        return False
 
    res = canProd(i+1,m) or canProd(i+1,m-a[i])
    return res
 
 
n = int(input())
a = [int(x) for x in input().split()]
q = int(input())
m = [int(x) for x in input().split()]
 
for i in m:
    if canProd(0,i):
        print("yes")
    else:
        print("no") from functools import lru_cache def canProd(i,m):
     
    if m == 0:
        return True
    if i >= n:
        return False
 
    res = canProd(i+1,m) or canProd(i+1,m-a[i])
    return res
 
  canProd if m == 0:
        return True
     m == 0 m 0 return True True if i >= n:
        return False
 
     i >= n i n return False False res = canProd(i+1,m) or canProd(i+1,m-a[i]) res canProd(i+1,m) or canProd(i+1,m-a[i]) canProd(i+1,m) canProd i+1 i 1 m canProd(i+1,m-a[i]) canProd i+1 i 1 m-a[i] m a[i] a i return res res i i m m @lru_cache(maxsize = 10000) canProd maxsize = 10000 @lru_cache(maxsize = 10000) lru_cache maxsize = 10000 maxsize 10000 canProd 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()] for i in m:
    if canProd(0,i):
        print("yes")
    else:
        print("no") i m if canProd(0,i):
        print("yes")
    else:
        print("no") canProd(0,i) canProd 0 i print("yes") print "yes" print("no") print "no" q = int(input()) int(input()) q m = [int(x) for x in input().split()] [int(x) for x in input().split()] m def canProd(i,m):
     
    if m == 0:
        return True
    if i >= n:
        return False
 
    res = canProd(i+1,m) or canProd(i+1,m-a[i])
    return res
 
  def canProd(i,m):
     
    if m == 0:
        return True
    if i >= n:
        return False
 
    res = canProd(i+1,m) or canProd(i+1,m-a[i])
    return res
 
  canProd n = int(input()) int(input()) n a = [int(x) for x in input().split()] [int(x) for x in input().split()] a
from functools import lru_cache

@lru_cache(maxsize = 10000)
def canProd(i,m):
     
    if m == 0:
        return True
    if i >= n:
        return False
 
    res = canProd(i+1,m) or canProd(i+1,m-a[i])
    return res
 
 
n = int(input())
a = [int(x) for x in input().split()]
q = int(input())
m = [int(x) for x in input().split()]
 
for i in m:
    if canProd(0,i):
        print("yes")
    else:
        print("no")