--???????????????????????????????????°

--??°????????????????´?????????£??????????????´??°??????????????§??????????????????????????????????????????????????´??°???i??¨???????????°?????????j????????\??????????´???§i?????????????????¨??????boole??¢??°
--???????????????????????¨???????????¢??°????????°??????f(i,j)=f(i-m_j,j+1) or f(i,j+1)??§????????§??????????????????,j????????§???????????????????????¨?????¨?????????0??????????????¨?????????
--???????????£????¬?????????°??§?§£??????

solver::Int->[Int]->Bool
solver x  (w:ws)= ((x-w>=0)&&(solver (x-w) ws))||(solver x ws)
solver 0  _     = True
solver _  _     = False

prints::[Bool]-> IO()
prints [] = return()
prints (x:xs) =do
  putStr (if x then "yes" else "no")
  putStr "\n"
  prints xs

main::IO()
main =do
  _<-getLine
  ws<-getLine
  let weights = map read (words ws)::[Int]
  _<-getLine
  is<-getLine
  let items   = map read (words is)::[Int]
  prints (map (\x -> solver x weights) items)