# coding: utf-8
# Your code here!

n = int(input())
A = [int(e) for e in input().split()]
q = int(input())
M = [int(e) for e in input().split()]

def solve(i,m):
    if m == 0:
        return True
    if i >= n:
        return False
    if m > sum(A[i:]):
        return False
    res = solve(i + 1,m) or solve(i + 1,m - A[i])
    return res
    
for m in M:
    if(solve(0,m)):
        print("yes")
    else:
        print("no") n = int(input()) n int(input()) int input() input int(e) for e in input().split() for e in input().split() e input().split() ().split () input split for e in input().split() int(e) int e A = [int(e) for e in input().split()] A [int(e) for e in input().split()] q = int(input()) q int(input()) int input() input int(e) for e in input().split() for e in input().split() e input().split() ().split () input split for e in input().split() int(e) int e M = [int(e) for e in input().split()] M [int(e) for e in input().split()] def solve(i,m):
    if m == 0:
        return True
    if i >= n:
        return False
    if m > sum(A[i:]):
        return False
    res = solve(i + 1,m) or solve(i + 1,m - A[i])
    return res
     solve if m == 0:
        return True
     m == 0 m 0 return True True if i >= n:
        return False
     i >= n i n return False False if m > sum(A[i:]):
        return False
     m > sum(A[i:]) m sum(A[i:]) sum A[i:] A i: i return False False res = solve(i + 1,m) or solve(i + 1,m - A[i]) res solve(i + 1,m) or solve(i + 1,m - A[i]) solve(i + 1,m) solve i + 1 i 1 m solve(i + 1,m - A[i]) solve i + 1 i 1 m - A[i] m A[i] A i return res res i i m m for m in M:
    if(solve(0,m)):
        print("yes")
    else:
        print("no") m M if(solve(0,m)):
        print("yes")
    else:
        print("no") solve(0,m) solve 0 m print("yes") print "yes" print("no") print "no" q = int(input()) int(input()) q def solve(i,m):
    if m == 0:
        return True
    if i >= n:
        return False
    if m > sum(A[i:]):
        return False
    res = solve(i + 1,m) or solve(i + 1,m - A[i])
    return res
     def solve(i,m):
    if m == 0:
        return True
    if i >= n:
        return False
    if m > sum(A[i:]):
        return False
    res = solve(i + 1,m) or solve(i + 1,m - A[i])
    return res
     solve A = [int(e) for e in input().split()] [int(e) for e in input().split()] A M = [int(e) for e in input().split()] [int(e) for e in input().split()] M n = int(input()) int(input()) n
# coding: utf-8
# Your code here!

n = int(input())
A = [int(e) for e in input().split()]
q = int(input())
M = [int(e) for e in input().split()]

def solve(i,m):
    if m == 0:
        return True
    if i >= n:
        return False
    if m > sum(A[i:]):
        return False
    res = solve(i + 1,m) or solve(i + 1,m - A[i])
    return res
    
for m in M:
    if(solve(0,m)):
        print("yes")
    else:
        print("no")
