{-# LANGUAGE BangPatterns #-}

import           Control.Applicative
import           Control.Monad
import qualified Data.ByteString.Char8 as B

read' :: B.ByteString -> Int
read' bs | Just (n, _) <- B.readInt bs = n

solve :: Int -> [Int] -> Bool
solve 0 _       = True
solve _ []      = False
solve !n (x:xs)
    | n < 0     = False
    | otherwise = solve (n - x) xs || solve n xs

print' :: Bool -> IO ()
print' True  = putStrLn "yes"
print' False = putStrLn "no"

main :: IO ()
main = do
    B.getLine
    as <- fmap read' . B.words <$> B.getLine
    B.getLine
    ms <- fmap read' . B.words <$> B.getLine
    mapM_ (print' . flip solve as) ms

