#include<iostream>
using namespace std;

int main()
{
    int n, q;
    int sum = 0;

    cin >> n;

    int a[n];
    for( int i = 0; i < n; i++ )
    {
        cin >> a[i];
        sum += a[i];
    }

    int x[400001] = {};
    x[sum] = sum;
    
    if( n >= 1 )
    for( int i = 0; i < n; i++ )
    {
        x[a[i]] = a[i];
        x[sum-a[i]] = sum - a[i];
    }

    if( n >= 3 )
    for( int i = 0; i < n - 1; i++ )
        for( int j = i + 1; j < n; j++ )
        {
            x[a[i]+a[j]] = a[i] + a[j];
            x[sum-(a[i]+a[j])] = sum - ( a[i] + a[j] );
        }

    if( n >= 5 )
    for( int i = 0; i < n - 2; i++ )
        for( int j = i + 1; j < n - 1; j++ )
            for( int k = j + 1; k < n; k++ )
            {
                x[a[i]+a[j]+a[k]] = a[i] + a[j] + a[k];
                x[sum-(a[i]+a[j]+a[k])] = sum - ( a[i] + a[j] + a[k] );
            }

    if( n >= 7 )
    for( int i = 0; i < n - 3; i++ )
        for( int j = i + 1; j < n - 2; j++ )
            for( int k = j + 1; k < n - 1; k++ )
                for( int l = k + 1; l < n; l++ )
                {
                    x[a[i]+a[j]+a[k]+a[l]] = a[i] + a[j] + a[k] + a[l];
                    x[sum-(a[i]+a[j]+a[k]+a[l])] = sum - ( a[i] + a[j] + a[k] + a[l] );
                }

    if( n >= 9 )
    for( int i = 0; i < n - 4; i++ )
        for( int j = i + 1; j < n - 3; j++ )
            for( int k = j + 1; k < n - 2; k++ )
                for( int l = k + 1; l < n - 1; l++ )
                    for( int m = l + 1; m < n; m++ )
                    {
                        x[a[i]+a[j]+a[k]+a[l]+a[m]] = a[i] + a[j] + a[k] + a[l] + a[m];
                        x[sum-(a[i]+a[j]+a[k]+a[l]+a[m])] = sum - ( a[i] + a[j] + a[k] + a[l] + a[m] );
                    }

    if( n >= 11 )
    for( int i = 0; i < n - 5; i++ )
        for( int j = i + 1; j < n - 4; j++ )
            for( int k = j + 1; k < n - 3; k++ )
                for( int l = k + 1; l < n - 2; l++ )
                    for( int m = l + 1; m < n - 1; m++ )
                        for( int o = m + 1; o < n; o++ )
                            {
                                x[a[i]+a[j]+a[k]+a[l]+a[m]+a[o]] = a[i] + a[j] + a[k] + a[l] + a[m] + a[o];
                                x[sum-(a[i]+a[j]+a[k]+a[l]+a[m]+a[o])] = sum - ( a[i] + a[j] + a[k] + a[l] + a[m] + a[o] );
                            }

    if( n >= 13 )
    for( int i = 0; i < n - 6; i++ )
        for( int j = i + 1; j < n - 5; j++ )
            for( int k = j + 1; k < n - 4; k++ )
                for( int l = k + 1; l < n - 3; l++ )
                    for( int m = l + 1; m < n - 2; m++ )
                        for( int o = m + 1; o < n - 1; o++ )
                            for( int p = o + 1; p < n; p++ )
                            {
                                x[a[i]+a[j]+a[k]+a[l]+a[m]+a[o]+a[p]] = a[i] + a[j] + a[k] + a[l] + a[m] + a[o] + a[p];
                                x[sum-(a[i]+a[j]+a[k]+a[l]+a[m]+a[o]+a[p])] = sum - ( a[i] + a[j] + a[k] + a[l] + a[m] + a[o] + a[p] );
                            }

    if( n >= 15 )
    for( int i = 0; i < n - 7; i++ )
        for( int j = i + 1; j < n - 6; j++ )
            for( int k = j + 1; k < n - 5; k++ )
                for( int l = k + 1; l < n - 4; l++ )
                    for( int m = l + 1; m < n - 3; m++ )
                        for( int o = m + 1; o < n - 2; o++ )
                            for( int p = o + 1; p < n - 1; p++ )
                                for( int r = p + 1; r < n; r++ )
                                {
                                    x[a[i]+a[j]+a[k]+a[l]+a[m]+a[o]+a[p]+a[r]] = a[i] + a[j] + a[k] + a[l] + a[m] + a[o] + a[p] + a[r];
                                    x[sum-(a[i]+a[j]+a[k]+a[l]+a[m]+a[o]+a[p]+a[r])] = sum - ( a[i] + a[j] + a[k] + a[l] + a[m] + a[o] + a[p] + a[r] );
                                }

    if( n >= 17 )        
    for( int i = 0; i < n - 8; i++ )
        for( int j = i + 1; j < n - 7; j++ )
            for( int k = j + 1; k < n - 6; k++ )
                for( int l = k + 1; l < n - 5; l++ )
                    for( int m = l + 1; m < n - 4; m++ )
                        for( int o = m + 1; o < n - 3; o++ )
                            for( int p = o + 1; p < n - 2; p++ )
                                for( int r = p + 1; r < n - 1; r++ )
                                    for( int s = r + 1; s < n; s++ )
                                    {
                                        x[a[i]+a[j]+a[k]+a[l]+a[m]+a[o]+a[p]+a[r]+a[s]] = a[i]+a[j]+a[k]+a[l]+a[m]+a[o]+a[p]+a[r]+a[s];
                                        x[sum-(a[i]+a[j]+a[k]+a[l]+a[m]+a[o]+a[p]+a[r]+a[s])] = sum-(a[i]+a[j]+a[k]+a[l]+a[m]+a[o]+a[p]+a[r]+a[s]);
                                    }
    
    if( n >= 19 )
    for( int i = 0; i < n - 9; i++ )
        for( int j = i + 1; j < n - 8; j++ )
            for( int k = j + 1; k < n - 7; k++ )
                for( int l = k + 1; l < n - 6; l++ )
                    for( int m = l + 1; m < n - 5; m++ )
                        for( int o = m + 1; o < n - 4; o++ )
                            for( int p = o + 1; p < n - 3; p++ )
                                for( int r = p + 1; r < n - 2; r++ )
                                    for( int s = r + 1; s < n - 1; s++ )
                                        for( int t = s + 1; t < n; t++ )
                                        {
                                            x[a[i]+a[j]+a[k]+a[l]+a[m]+a[o]+a[p]+a[r]+a[s]+a[t]] = a[i]+a[j]+a[k]+a[l]+a[m]+a[o]+a[p]+a[r]+a[s]+a[t];
                                            x[sum-(a[i]+a[j]+a[k]+a[l]+a[m]+a[o]+a[p]+a[r]+a[s]+a[t])] = sum-(a[i]+a[j]+a[k]+a[l]+a[m]+a[o]+a[p]+a[r]+a[s]+a[t]);
                                        }

    cin >> q;

    int m[q];
    for( int i = 0; i < q; i++ )
    {
        cin >> m[i];
        if( x[m[i]] == m[i] )
            cout << "yes" << endl;
        else
            cout << "no" << endl;
    }
    return 0;
}


Measured memory_bytes: 4672