#include <stdio.h>
int n;
int q;
int A[2000];
int m[2000];

int solve(int, int);

int main() {
  int i = 0;
  scanf("%d", &n);
  while (scanf("%d", &A[i]) != EOF && i < n) i++;
  i = 0;
  scanf("%d", &q);
  while (scanf("%d", &m[i]) != EOF && i < q) i++;
  printf("n = %d, q = %d\n", n, q);

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

  return 0;
}

int solve(int i, int m) {
  if (m == 0) return 1;
  if (i >= n) return 0;

  int result = solve(i+1, m) || solve(i+1, m - A[i]);
  return result;
}