let words str =
  let len = String.length str in
  let buf = Buffer.create 10 in
  let rec loop cont = function
      i when i = len -> cont [Buffer.contents buf |> int_of_string]
    | i ->
      loop
        (match str.[i] with
         | ' ' ->
           let v = Buffer.contents buf |> int_of_string in
           Buffer.clear buf; (fun x -> cont (v::x))
         | c ->
           Buffer.add_char buf c; cont)
        (i+1)
  in loop (fun x -> x) 0

let check n seq =
  let filtered = List.filter (fun x -> x <= n) seq in
  let rec loop l results = match l with
      [] -> if List.mem n results then "yes" else "no"
    | h::t -> List.append results (List.map (fun v -> v+h) results)
              |> loop t
  in
  loop filtered [0]

let () =
  let _ = read_int () in
  let an = read_line () |> words in
  let _ = read_int () in
  let mi = read_line () |> words in
  List.iter (fun x -> check x an |> Printf.printf "%s\n") mi