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

#define IS_BIT(i, j) (((i) & (1 << j)) ? 1 : 0)

int main(int argc, char* argv[]) {
    int a[20];
    int m[200];
    int n, i, j, d, c, q, k;
    int max_check = 1;

    scanf("%d\n", &n);
    for ( i = 0; i < n; i++ ) {
        scanf("%d", &d);
        a[i] = d;
        c = getc(stdin);        /* space */
    }
    if ( c == '\r' ) {
        c = getc(stdin);
    }
    assert( c == '\n' );

    scanf("%d\n", &q);
    for ( i = 0; i < q; i++ ) {
        scanf("%d", &d);
        m[i] = d;
        c = getc(stdin);        /* space */
    }
    if ( c == '\r' ) {
        c = getc(stdin);
    }
    assert( c == '\n' );

    for ( i = 0; i < n; i++ ) {
        max_check = max_check * 2;
    }

    for ( k = 0; k < q; k++ ) {
        int hit = 0;
        for ( i = 1; i < max_check; i++ ) {
            int sum = 0;
            for ( j = 0; j < n; j++ ) {
                int bit = IS_BIT(i, j);
                sum = sum + bit * a[j];
                if ( sum > m[k] ) {
                    break;
                }
            }
            if ( sum == m[k] ) {
                hit = 1;
                break;
            }
        }
        if ( hit ) {
            printf("yes\n");
        } else {
            printf("no\n");
        }
    }

    return 0;
}

