from functools import lru_cache

num = int(input())
arr = list(map(int, input().split()))
question_nums = int(input())
questions = list(map(int, input().split()))

@lru_cache(maxsize=2**12)
def solve(index, total):
    if total == 0:
        return True
    if index == num:
        return False
    return solve(index+1, total - arr[index]) or solve(index+1, total)

for q in questions:
    if solve(0, q):
        print("yes")
    else:
        print("no") from functools import lru_cache num = int(input()) num int(input()) int input() input arr = list(map(int, input().split())) arr list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split question_nums = int(input()) question_nums int(input()) int input() input questions = list(map(int, input().split())) questions list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def solve(index, total):
    if total == 0:
        return True
    if index == num:
        return False
    return solve(index+1, total - arr[index]) or solve(index+1, total) solve if total == 0:
        return True
     total == 0 total 0 return True True if index == num:
        return False
     index == num index num return False False return solve(index+1, total - arr[index]) or solve(index+1, total) solve(index+1, total - arr[index]) or solve(index+1, total) solve(index+1, total - arr[index]) solve index+1 index 1 total - arr[index] total arr[index] arr index solve(index+1, total) solve index+1 index 1 total index index total total @lru_cache(maxsize=2**12) solve maxsize=2**12 @lru_cache(maxsize=2**12) lru_cache maxsize=2**12 maxsize 2**12 2 12 solve for q in questions:
    if solve(0, q):
        print("yes")
    else:
        print("no") q questions if solve(0, q):
        print("yes")
    else:
        print("no") solve(0, q) solve 0 q print("yes") print "yes" print("no") print "no" def solve(index, total):
    if total == 0:
        return True
    if index == num:
        return False
    return solve(index+1, total - arr[index]) or solve(index+1, total) def solve(index, total):
    if total == 0:
        return True
    if index == num:
        return False
    return solve(index+1, total - arr[index]) or solve(index+1, total) solve num = int(input()) int(input()) num arr = list(map(int, input().split())) list(map(int, input().split())) arr question_nums = int(input()) int(input()) question_nums questions = list(map(int, input().split())) list(map(int, input().split())) questions
from functools import lru_cache

num = int(input())
arr = list(map(int, input().split()))
question_nums = int(input())
questions = list(map(int, input().split()))

@lru_cache(maxsize=2**12)
def solve(index, total):
    if total == 0:
        return True
    if index == num:
        return False
    return solve(index+1, total - arr[index]) or solve(index+1, total)

for q in questions:
    if solve(0, q):
        print("yes")
    else:
        print("no")
