import std.algorithm, std.conv, std.range, std.stdio, std.string;
import std.bitmanip;

void main()
{
  auto n = readln.chomp.to!size_t;
  auto ai = readln.split.to!(int[]);
  auto q = readln.chomp.to!size_t;
  auto mi = readln.split.to!(int[]);

  bool canMake(int m)
  {
    foreach (i; 0..1 << n)
      if (ai.indexed(i.bitsSet).sum == m)
        return true;
    return false;
  }

  foreach (m; mi)
    writeln(canMake(m) ? "yes" : "no");
}