open Scanf
open Printf

let () =
 let n = scanf "%d\n" (fun x -> x) in
 let a_ = Array.init n (fun _ -> scanf "%d " (fun a -> a)) in
 let m = scanf "%d\n" (fun x -> x) in
 let b_ = Array.init n (fun _ -> scanf "%d " (fun b -> b)) in
 let rec solve i x =
  if x = 0 then true
  else if i >= n then false
  else
   ( solve (i+1, x) || solve (i+1, x - a_.(i)) )
 in 
 let rec judge i =
  if i = m then ()
  else
   if (solve 0 b_.(i)) then printf "yes\n"
   else printf "no\n"
   ; judge (i+1)
 in 
 judge 0