function main(_stdin) {
    const stdin = _stdin.trim().split('\n');
    const n = Number(stdin.shift());
    const A = stdin.shift().split(' ').map(Number);
    const q = Number(stdin.shift());
    const m = stdin.shift().split(' ').map(Number);

    let totalResults = [];
    let max = '';
    for (let i = 1; i <= n; i++) {
        max += '1';
    }
    let combi = parseInt(max, 2);
    for (let i = 1, l = parseInt(combi, 10); i <= l; i++) {
        let op = i.toString(2);
        op = padding(op, n);
        const targets = A.filter((e, i) => op[i] === '1');
        totalResults.push(targets.reduce((t, c) => t += c));
    }

    for (let i = 0; i < q; i++) {
        console.log(totalResults.includes(m[i]) ? 'yes' : 'no');
    }
}

function padding(str, n) {
    if(str.length > n) return str;
    let diff = n - str.length;
    let pad = '';
    for(let i = 0;i<diff;i++){
        pad += '0';
    }
    return pad + str;
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));

