#include <stdio.h>

int solve(int i, int a[], int m, int n) {
  int res;
  if (m == 0) {
    return 1;
  }
  if (i >= n) {
    return 0;
  }
  res = solve(i + 1, a, m, n) || solve(i + 1, a, m - a[i], n);
  return res;
}

int main(void) {
  int i, j, a[10000], m[10000], n, l1, l2;
  char buf[2];
  scanf("%d", &l1);
  for (n = 0; n < l1 && (j = scanf("%d%1[\n]", a+n, buf)) == 1; n++) ;
  if (j == 2)
  n++;
  scanf("%d", &l2);
  for (n = 0; n < l2 && (j = scanf("%d%1[\n]", m+n, buf)) == 1; n++) ;
  if (j == 2)
  n++;

  for (i = 0; i < l2; i++) {
    if (solve(0, a, m[i], l1) == 1) {
      printf("yes\n");
    } else {
      printf("no\n");
    }
  }
  return 0;
}

