let max_m = 2000

let to_int_list str =
  Str.split (Str.regexp_string " ") str |> List.map int_of_string

let make_dp a n =
  let dp = Array.make_matrix (n + 1) (max_m + 1) false in
  let rec duduwa i j =
    if j > max_m then ()
    else begin
      if dp.(i - 1).(j) then dp.(i).(j) <- true
      else if j > a.(i - 1) && dp.(i - 1).(j - a.(i - 1)) then dp.(i).(j) <- true;
      duduwa i (j + 1)
    end
  in
  let rec doit i =
    if i > n then dp
    else (dp.(i).(a.(i - 1)) <- true; duduwa i 1; doit (i + 1))
  in
  doit 1

let _ =
  let n = read_int () in
  let a = Array.of_list (to_int_list (read_line ())) in
  let _ = read_int () in
  let m = to_int_list (read_line ()) in
  let dp = make_dp a n in
  List.iter (fun e -> Printf.printf "%s\n" (if dp.(n).(e) then "yes" else "no")) m