#include<stdio.h>
#define MAX 3000


void next(int B[],int n);





int main(){
int i,n,j,k;
int m;
int sum;
int A[MAX];
int B[MAX+1]={0};
int C[MAX];

scanf("%d",&n);
for(i=0;i<n;i++){scanf("%d",&A[i]);}
scanf("%d",&m);
for(i=0;i<m;i++){scanf("%d",&C[i]);}


for(j=0;j<m;j++){

for(k=0;k<=n;k++){B[k]=0;}

while(B[n]!=1){
 sum=0;
 for(i=0;i<n;i++){sum=sum+A[i]*B[i];}
 if(sum==C[j]){printf("yes\n");break;}
 else{next(B,n);}
}
if(B[n]==1){printf("no\n");}

}



return 0;
}

void next(int B[],int n){
int i;
B[0]++;
for(i=0;i<n;i++){
 if(B[i]==2){B[i+1]=B[i+1]+1;B[i]=0;}
}
}

