#include<stdio.h>

int N,s2[10000],sum=0,j;

int solve(int i,int *s){

  int c=0;

  if(i>=N)return 0;

  if(s2[j]==sum){
    return 1;
  }
  else if(s2[j]<sum)return 0;
  sum+=*s;
  solve(i+1,s++);
}

int main(){

  int i,N2,flag=0;

  scanf("%d",&N);
  int s[N];
  for(i=0;i<N;i++){
    scanf("%d",&s[i]);
  }

  scanf("%d",&N2);

  for(i=0;i<N2;i++){
    scanf("%d",&s2[i]);
  }

  for(j=0;j<N2;j++){
    flag=solve(0,s);
    sum=0;
    if(flag==0)printf("yes\n");
  else if(flag==1)printf("no\n");
  }


}
