import std.array, std.stdio, std.conv, std.string, std.math, std.random, std.range,std.functional;
import std.algorithm.searching, std.algorithm.sorting, std.algorithm.iteration, std.algorithm.comparison;


void main()
{
    readln();
    auto aList = readln().split.to!(int[]).sort();
    readln();
    int[] qList = readln().split.to!(int[]);

    foreach(q; qList)
    {
        bool func(Range)(int m, Range list)
        {
            if(m == 0)
            {
                return true;
            }
            if(m < 0)
            {
                return false;
            }
            if(list.length == 0)
            {
                return false;
            }
            return func(m, list[1..$]) || func(m-list[0], list[1..$]);
        }
        writeln(func(q, aList)?"yes":"no");
    }
}
