# -*- coding: utf-8 -*-


if __name__ == '__main__':

    n = int(input())
    A = [int(a) for a in input().split(" ")]
    q = int(input())
    M = [int(m) for m in input().split(" ")]

    def solve(i, m):
        if m == 0:
            return True
        if i >= n or m > sum(A):
            return False
        res = solve(i+1, m) or solve(i+1, m-A[i])
        return res

    ans = []
    for m in M:
        if solve(0, m):
            ans.append("yes")
        else:
            ans.append("no")

    print("\n".join(ans))
 if __name__ == '__main__':

    n = int(input())
    A = [int(a) for a in input().split(" ")]
    q = int(input())
    M = [int(m) for m in input().split(" ")]

    def solve(i, m):
        if m == 0:
            return True
        if i >= n or m > sum(A):
            return False
        res = solve(i+1, m) or solve(i+1, m-A[i])
        return res

    ans = []
    for m in M:
        if solve(0, m):
            ans.append("yes")
        else:
            ans.append("no")

    print("\n".join(ans)) __name__ == '__main__' __name__ '__main__' n = int(input()) n int(input()) int input() input int(a) for a in input().split(" ") for a in input().split(" ") a input().split(" ") ().split () input split " " for a in input().split(" ") int(a) int a A = [int(a) for a in input().split(" ")] A [int(a) for a in input().split(" ")] q = int(input()) q int(input()) int input() input int(m) for m in input().split(" ") for m in input().split(" ") m input().split(" ") ().split () input split " " for m in input().split(" ") int(m) int m M = [int(m) for m in input().split(" ")] M [int(m) for m in input().split(" ")] def solve(i, m):
        if m == 0:
            return True
        if i >= n or m > sum(A):
            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 or m > sum(A):
            return False
         i >= n or m > sum(A) i >= n i n m > sum(A) m sum(A) sum A 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 ans = [] ans [] for m in M:
        if solve(0, m):
            ans.append("yes")
        else:
            ans.append("no")

     m M if solve(0, m):
            ans.append("yes")
        else:
            ans.append("no")

     solve(0, m) solve 0 m ans.append("yes") ans.append ans append "yes" ans.append("no") ans.append ans append "no" print("\n".join(ans)) print "\n".join(ans) "\n".join "\n" join ans A = [int(a) for a in input().split(" ")] [int(a) for a in input().split(" ")] A q = int(input()) int(input()) q M = [int(m) for m in input().split(" ")] [int(m) for m in input().split(" ")] M ans = [] [] ans n = int(input()) int(input()) n def solve(i, m):
        if m == 0:
            return True
        if i >= n or m > sum(A):
            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 or m > sum(A):
            return False
        res = solve(i+1, m) or solve(i+1, m-A[i])
        return res

     solve
# -*- coding: utf-8 -*-


if __name__ == '__main__':

    n = int(input())
    A = [int(a) for a in input().split(" ")]
    q = int(input())
    M = [int(m) for m in input().split(" ")]

    def solve(i, m):
        if m == 0:
            return True
        if i >= n or m > sum(A):
            return False
        res = solve(i+1, m) or solve(i+1, m-A[i])
        return res

    ans = []
    for m in M:
        if solve(0, m):
            ans.append("yes")
        else:
            ans.append("no")

    print("\n".join(ans))

