import Control.Applicative
import Data.List

find_print :: [[Int]] -> Int -> IO ()
find_print [] q = putStrLn $ "no"
find_print (x:xs) q = if (sum x) == q then putStrLn $ "yes" else find_print xs q


exsearch :: [Int] -> Int -> IO()
exsearch ns q = do
    let sub_ns = subsequences ns
     in find_print sub_ns q


main :: IO ()
main = do
    _ <- getLine
    ns <-  (map (\x -> read x :: Int). words) <$> getLine
    _ <- getLine
    qs <-  (map (\x -> read x :: Int). words) <$> getLine
    mapM_ (exsearch ns) qs