import Data.List
import Data.List.Split

strToInt str = (read str :: Int)
getLineInt = fmap strToInt getLine
getLineInts = fmap ((map strToInt) . (splitOn " ")) getLine

solve :: [Int] -> Int -> Int -> Int -> Bool
solve ls n summed k =
  if ((ls !! n) + summed == k) then
    True
  else if (((length ls) - 1) > n) then
    (solve ls (n+1) summed k) || (solve ls (n+1) (summed + (ls !! n)) k)
  else
    False

main = do
  n <- getLineInt
  xs <- getLineInts
  m <- getLineInt
  sums <- getLineInts
  putStrLn $ intercalate "\n" $ map (\x -> if x then "yes" else "no") (map (solve xs 0 0) sums)

