#include <stdio.h>

int main(){
    int i,j,n1,n2;
    scanf("%d",&n1);
    int A1[n1];
    for(i=0;i<n1;i++)
        scanf("%d",&A1[i]);
    scanf("%d",&n2);
    int A2[n2];
    for(i=0;i<n2;i++)
        scanf("%d",&A2[i]);

    for(i=0;i<n2;i++){
        for(j=n1-1;j>=0;j--){
            if(A2[i]>=A1[j])A2[i]-=A1[j];
            //printf("%d>%d ?\n",A2[i],A1[j]);
        }
        //printf("%d\n",A2[i]);
        if(A2[i]==0)printf("yes\n");
        else printf("no\n");
    }
    
    return 0;
}