#include<stdio.h>

int k,l;
int a[20],m[200];

void insertionSort(int *b){
  int i,j,v;
  
  for(i = 1; i < k; i++){
    v = b[i];
    j = i - 1;
    while(j >= 0 && b[j] > v){
      b[j + 1] = b[j];
      j--;
    }
    b[j + 1] = v;
  }

}

int exhaustiveSearch(int n){
  int b,i,f,k,l,buf;

  for(i = 0; i < k; i++){
    if(m[n] == a[i]) return 1;
    else if(m[n] < a[i]) {
      if(i == 0 || i == 1) return 0;
      i++;
      break;
    }
  }
  
  b = i;
  printf("b: %d\n",b);
  buf = 0;
  printf("buf: %d\n",buf);
  while(1){
    for(i = 0; i < b; i++){
      if( buf > m[n]) return 0;
      if((buf + a[i]) > m[n]){ 
	buf += a[i - 1];
	printf("R1 buf: %d a[%d]: %d b: %d\n",buf,i-1,a[i-1],b);
	if( buf == m[n]) return 1;
	if((b = i - 1) < 0) return 0;
      }
      else if(i = b - 2){
	buf += a[i];
	printf("R2 buf: %d a[%d]: %d b: %d\n",buf,i,a[i],b);
	if( buf == m[n]) return 1;
	b--;
      }
      i = 0;
    }    
  }
   
  return 0;
}

int main(){
  int i;
  
  scanf("%d",&k);
  for(i = 0; i < k; i++)
    scanf("%d",&a[i]);
  insertionSort(a);
  
  printf("\n");
  for(i = 0;i<k;i++)
    printf("%d ",a[i]);
  printf("\n");
  
  scanf("%d",&l);
  for(i = 0; i < l; i++)
    scanf("%d",&m[i]);

  for(i = 0; i < l; i++){
    if(exhaustiveSearch(i) == 1)
      printf("yes\n");
    else
      printf("no\n");
  }
  return 0;
}

