#include <stdio.h>
#include <stdlib.h>

int *A;
char **zeroone;

void makezeroone(int loop, int n){
  int i, j, num;

  zeroone = (char **)malloc(sizeof(char *) * loop);
  for(i=0; i<loop; i++){
    zeroone[i] = (char *)malloc(sizeof(char) * n);
  }

  for(i=0; i<loop; i++){
    num = i;
    for(j=n-1; 0<=j; j--){
      zeroone[i][j] = num % 2;
      num /= 2;
    }
  }
}

int isMake(int loop, int n, int m){
  int i, j, sum;
  for(i=0; i<loop; i++){
    sum = 0;
    for(j=0; j<n; j++){
      // printf("A[%d] %d  zeroone[%d][%d] %d\n",j,A[j], i,j,zeroone[i][j]);
      sum += A[j] * (int)zeroone[i][j];
      // printf("sum %d\n",sum);
      //if(sum > m) return 0;
      if(sum == m) return 1;
    }
    // printf("\n");
  }
  return 0;
}

int main(){
  int n, q, m;
  int i, j, sum, loop=1;

// get data
  scanf("%d",&n);
  A = (int *)malloc(sizeof(int) * n);
  for(i=0; i<n; i++){
    scanf("%d", &A[i]);
    loop *= 2;
  }

  makezeroone(loop, n);

  scanf("%d",&q);
  for(i=0; i<q; i++){
    scanf("%d",&m);
// printf("-----%d-----\n",m);
    if(isMake(loop, n, m)) printf("yes\n");
    else printf("no\n");
  }

  return 0;
}

