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

int *C;
int *A;
int *B;
int Posb, track;

void print(int p){
    int sum = 0;
    for(int i = 0; i <= p; i++){
        
        if(C[i] == 1){
            sum+=A[i];
            if(sum > B[Posb])break;
        }
    }
        if(sum != B[Posb]){
            track=-1;
    }
    if(sum == B[Posb]){
        track = 1;
        return;
    }
}
void find(int l, int p){
    if (l == p){
        if(C[l] == 0)print(p);
        if(track == 1)return;
        if(C[l] == 1) print(p);
        return;
    }
    if(track == 1)return;
    C[l] = 0;
    find(l+1,p);
    if(track == 1)return;
    C[l] = 1;
    find(l+1,p);
    if(track == 1)return;
}
    
int main(){
    
     
    int n;
    scanf("%d",&n);
    A =(int*)malloc(n * sizeof(int));
    for(int a = 0; a < n; a++){
            scanf("%d",&A[a]);
    }

    int m;
    scanf("%d",&m);
    B = (int*)malloc(m * sizeof(int));
    C = (int*)malloc(m * sizeof(int));
    for(int a = 0; a < m; a++){
        scanf("%d",&B[a]);
        C[a] = 0;
    }

    int l = 0;
    for(Posb = 0; Posb < m; Posb++){
    find(l,n);
    
    if(track == 1)printf("yes\n");
    if(track == -1)printf("no\n");
    track = 0;
    }
    free(B);
    free(A);
    return 0;
}




