
var n:Int = 0
var A: MutableList<Int> = mutableListOf<Int>()
fun main(args: Array<String>) {
    n = readLine()!!.toInt()
    A.addAll(readLine()!!.split(" ").map { it.toInt() })
    val q = readLine()!!.toInt()
    val M: List<Int> = readLine()!!.split(" ").map { it.toInt() }
    //MをAから作成可能か判定
    for (i in (0..q-1))
    {
        if (solve(0,M[i])==1)
        {
            println("yes")
        }
        else
        {
            println("no")
        }
    }

}
private fun solve(i:Int,m:Int):Int
{
    if (m==0)
    {
        return 1
    }
    if (m < 0)
    {
        return 0
    }
    if(i >= n)
    {
        return 0
    }

    if ((solve(i+1,m)==1) || (solve(i+1,m-A[i])==1))
    {
        return 1
    }
    else
    {
        return 0
    }
}
