num_n = int(input())
n = [int(x) for x in input().split()]
num_m = int(input())
m = [int(x) for x in input().split()]
     
def solve(i, m):
   if m == 0:
      return True
   if i >= num_n or m > sum(n):
      return False
   res = solve(i + 1, m) or solve(i + 1,m - n[i])
   return res
      
for k in range(num_m):
   if solve(0, m[k]):
      print ("yes")
   else:
      print ("no") num_n = int(input()) num_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 n = [int(x) for x in input().split()] n [int(x) for x in input().split()] num_m = int(input()) num_m 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()] def solve(i, m):
   if m == 0:
      return True
   if i >= num_n or m > sum(n):
      return False
   res = solve(i + 1, m) or solve(i + 1,m - n[i])
   return res
       solve if m == 0:
      return True
    m == 0 m 0 return True True if i >= num_n or m > sum(n):
      return False
    i >= num_n or m > sum(n) i >= num_n i num_n m > sum(n) m sum(n) sum n return False False res = solve(i + 1, m) or solve(i + 1,m - n[i]) res solve(i + 1, m) or solve(i + 1,m - n[i]) solve(i + 1, m) solve i + 1 i 1 m solve(i + 1,m - n[i]) solve i + 1 i 1 m - n[i] m n[i] n i return res res i i m m for k in range(num_m):
   if solve(0, m[k]):
      print ("yes")
   else:
      print ("no") k range(num_m) range num_m if solve(0, m[k]):
      print ("yes")
   else:
      print ("no") solve(0, m[k]) solve 0 m[k] m k print ("yes") print "yes" print ("no") print "no" def solve(i, m):
   if m == 0:
      return True
   if i >= num_n or m > sum(n):
      return False
   res = solve(i + 1, m) or solve(i + 1,m - n[i])
   return res
       def solve(i, m):
   if m == 0:
      return True
   if i >= num_n or m > sum(n):
      return False
   res = solve(i + 1, m) or solve(i + 1,m - n[i])
   return res
       solve num_n = int(input()) int(input()) num_n n = [int(x) for x in input().split()] [int(x) for x in input().split()] n num_m = int(input()) int(input()) num_m m = [int(x) for x in input().split()] [int(x) for x in input().split()] m
num_n = int(input())
n = [int(x) for x in input().split()]
num_m = int(input())
m = [int(x) for x in input().split()]
     
def solve(i, m):
   if m == 0:
      return True
   if i >= num_n or m > sum(n):
      return False
   res = solve(i + 1, m) or solve(i + 1,m - n[i])
   return res
      
for k in range(num_m):
   if solve(0, m[k]):
      print ("yes")
   else:
      print ("no")
