N = int(input())
A = list(map(int,input().split()))
Q = int(input())
M = list(map(int,input().split()))


def bitsearch():
  nums = [0] * (2 ** N)
  for i in range(2 ** N):
    num = 0
    for j in range(N):
      if (i >> j) & 1:
        num += A[j]
        nums[i] = num
  for q in range(Q):
    if M[q] in nums:
      print("yes")
    else:
      print("no")

bitsearch()
 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 def bitsearch():
  nums = [0] * (2 ** N)
  for i in range(2 ** N):
    num = 0
    for j in range(N):
      if (i >> j) & 1:
        num += A[j]
        nums[i] = num
  for q in range(Q):
    if M[q] in nums:
      print("yes")
    else:
      print("no") bitsearch nums = [0] * (2 ** N) nums [0] * (2 ** N) [0] 0 2 ** N 2 N for i in range(2 ** N):
    num = 0
    for j in range(N):
      if (i >> j) & 1:
        num += A[j]
        nums[i] = num
   i range(2 ** N) range 2 ** N 2 N num = 0 num 0 for j in range(N):
      if (i >> j) & 1:
        num += A[j]
        nums[i] = num
   j range(N) range N if (i >> j) & 1:
        num += A[j]
        nums[i] = num
   (i >> j) & 1 i >> j i j 1 num += A[j] num A[j] A j nums[i] = num nums[i] nums i num for q in range(Q):
    if M[q] in nums:
      print("yes")
    else:
      print("no") q range(Q) range Q if M[q] in nums:
      print("yes")
    else:
      print("no") M[q] in nums M[q] M q nums print("yes") print "yes" print("no") print "no" bitsearch() bitsearch A = list(map(int,input().split())) list(map(int,input().split())) A N = int(input()) int(input()) N Q = int(input()) int(input()) Q def bitsearch():
  nums = [0] * (2 ** N)
  for i in range(2 ** N):
    num = 0
    for j in range(N):
      if (i >> j) & 1:
        num += A[j]
        nums[i] = num
  for q in range(Q):
    if M[q] in nums:
      print("yes")
    else:
      print("no") def bitsearch():
  nums = [0] * (2 ** N)
  for i in range(2 ** N):
    num = 0
    for j in range(N):
      if (i >> j) & 1:
        num += A[j]
        nums[i] = num
  for q in range(Q):
    if M[q] in nums:
      print("yes")
    else:
      print("no") bitsearch M = list(map(int,input().split())) list(map(int,input().split())) M
N = int(input())
A = list(map(int,input().split()))
Q = int(input())
M = list(map(int,input().split()))


def bitsearch():
  nums = [0] * (2 ** N)
  for i in range(2 ** N):
    num = 0
    for j in range(N):
      if (i >> j) & 1:
        num += A[j]
        nums[i] = num
  for q in range(Q):
    if M[q] in nums:
      print("yes")
    else:
      print("no")

bitsearch()

