import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
import copy
import bisect
import functools

@functools.lru_cache(None)
def dfs(i,sum_v,val):
    if i == n:
        return sum_v == val
    if dfs(i+1,sum_v,val):
        return True
    if dfs(i+1,sum_v + A[i],val):
        return True
    return False
n = int(input())
A = list(map(int,input().split()))
q = int(input())
m = list(map(int,input().split()))

for i in range(q):
    if dfs(0,0,m[i]):
        print("yes")
    else:
        print("no")

 import sys sys import itertools itertools sys.setrecursionlimit(1000000000) sys.setrecursionlimit sys setrecursionlimit 1000000000 from heapq import heapify,heappop,heappush,heappushpop import math math import collections collections import copy copy import bisect bisect import functools functools def dfs(i,sum_v,val):
    if i == n:
        return sum_v == val
    if dfs(i+1,sum_v,val):
        return True
    if dfs(i+1,sum_v + A[i],val):
        return True
    return False dfs if i == n:
        return sum_v == val
     i == n i n return sum_v == val sum_v == val sum_v val if dfs(i+1,sum_v,val):
        return True
     dfs(i+1,sum_v,val) dfs i+1 i 1 sum_v val return True True if dfs(i+1,sum_v + A[i],val):
        return True
     dfs(i+1,sum_v + A[i],val) dfs i+1 i 1 sum_v + A[i] sum_v A[i] A i val return True True return False False i i sum_v sum_v val val @functools.lru_cache(None) dfs None @functools.lru_cache(None) functools.lru_cache None dfs n = int(input()) n int(input()) int input() input A = list(map(int,input().split())) A list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split q = int(input()) q int(input()) int input() input m = list(map(int,input().split())) m list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split for i in range(q):
    if dfs(0,0,m[i]):
        print("yes")
    else:
        print("no") i range(q) range q if dfs(0,0,m[i]):
        print("yes")
    else:
        print("no") dfs(0,0,m[i]) dfs 0 0 m[i] m i print("yes") print "yes" print("no") print "no" m = list(map(int,input().split())) list(map(int,input().split())) m q = int(input()) int(input()) q n = int(input()) int(input()) n def dfs(i,sum_v,val):
    if i == n:
        return sum_v == val
    if dfs(i+1,sum_v,val):
        return True
    if dfs(i+1,sum_v + A[i],val):
        return True
    return False def dfs(i,sum_v,val):
    if i == n:
        return sum_v == val
    if dfs(i+1,sum_v,val):
        return True
    if dfs(i+1,sum_v + A[i],val):
        return True
    return False dfs A = list(map(int,input().split())) list(map(int,input().split())) A
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
import copy
import bisect
import functools

@functools.lru_cache(None)
def dfs(i,sum_v,val):
    if i == n:
        return sum_v == val
    if dfs(i+1,sum_v,val):
        return True
    if dfs(i+1,sum_v + A[i],val):
        return True
    return False
n = int(input())
A = list(map(int,input().split()))
q = int(input())
m = list(map(int,input().split()))

for i in range(q):
    if dfs(0,0,m[i]):
        print("yes")
    else:
        print("no")


