n = int(input())
A = [int(i) for i in input().split()]

q = int(input())
m = [int(i) for i in input().split()]


def dfs(idx, s, target):
    if s == target:
        return 1
    if s > target or idx == n:
        return 0
    if s + sum(A[idx:]) < target:
        return 0

    return dfs(idx+1, s, target) or dfs(idx+1, s + A[idx], target)


for i in m:
    ans = 'yes' if dfs(0, 0, i) else 'no'
    print(ans)
 n = int(input()) n int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i A = [int(i) for i in input().split()] A [int(i) for i in input().split()] q = int(input()) q int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i m = [int(i) for i in input().split()] m [int(i) for i in input().split()] def dfs(idx, s, target):
    if s == target:
        return 1
    if s > target or idx == n:
        return 0
    if s + sum(A[idx:]) < target:
        return 0

    return dfs(idx+1, s, target) or dfs(idx+1, s + A[idx], target) dfs if s == target:
        return 1
     s == target s target return 1 1 if s > target or idx == n:
        return 0
     s > target or idx == n s > target s target idx == n idx n return 0 0 if s + sum(A[idx:]) < target:
        return 0

     s + sum(A[idx:]) < target s + sum(A[idx:]) s sum(A[idx:]) sum A[idx:] A idx: idx target return 0 0 return dfs(idx+1, s, target) or dfs(idx+1, s + A[idx], target) dfs(idx+1, s, target) or dfs(idx+1, s + A[idx], target) dfs(idx+1, s, target) dfs idx+1 idx 1 s target dfs(idx+1, s + A[idx], target) dfs idx+1 idx 1 s + A[idx] s A[idx] A idx target idx idx s s target target for i in m:
    ans = 'yes' if dfs(0, 0, i) else 'no'
    print(ans) i m ans = 'yes' if dfs(0, 0, i) else 'no' ans 'yes' if dfs(0, 0, i) else 'no' dfs(0, 0, i) dfs 0 0 i 'yes' 'no' print(ans) print ans ans = 'yes' if dfs(0, 0, i) else 'no' 'yes' if dfs(0, 0, i) else 'no' ans m = [int(i) for i in input().split()] [int(i) for i in input().split()] m A = [int(i) for i in input().split()] [int(i) for i in input().split()] A q = int(input()) int(input()) q n = int(input()) int(input()) n def dfs(idx, s, target):
    if s == target:
        return 1
    if s > target or idx == n:
        return 0
    if s + sum(A[idx:]) < target:
        return 0

    return dfs(idx+1, s, target) or dfs(idx+1, s + A[idx], target) def dfs(idx, s, target):
    if s == target:
        return 1
    if s > target or idx == n:
        return 0
    if s + sum(A[idx:]) < target:
        return 0

    return dfs(idx+1, s, target) or dfs(idx+1, s + A[idx], target) dfs
n = int(input())
A = [int(i) for i in input().split()]

q = int(input())
m = [int(i) for i in input().split()]


def dfs(idx, s, target):
    if s == target:
        return 1
    if s > target or idx == n:
        return 0
    if s + sum(A[idx:]) < target:
        return 0

    return dfs(idx+1, s, target) or dfs(idx+1, s + A[idx], target)


for i in m:
    ans = 'yes' if dfs(0, 0, i) else 'no'
    print(ans)

