import itertools

def check(lst, n, x):
    for i in range(2, n+1):
        B = list(itertools.combinations(lst,i))
        for C in B:
            if x == sum(C):
                return True
    return False

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

for x in m:
    if x > sum(A):
        print("no")
    elif (x in A) or check(A, n, x):
        print("yes")
    else:
        print("no")
 import itertools itertools def check(lst, n, x):
    for i in range(2, n+1):
        B = list(itertools.combinations(lst,i))
        for C in B:
            if x == sum(C):
                return True
    return False check for i in range(2, n+1):
        B = list(itertools.combinations(lst,i))
        for C in B:
            if x == sum(C):
                return True
     i range(2, n+1) range 2 n+1 n 1 B = list(itertools.combinations(lst,i)) B list(itertools.combinations(lst,i)) list itertools.combinations(lst,i) itertools.combinations itertools combinations lst i for C in B:
            if x == sum(C):
                return True
     C B if x == sum(C):
                return True
     x == sum(C) x sum(C) sum C return True True return False False lst lst n n x x 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()] for x in m:
    if x > sum(A):
        print("no")
    elif (x in A) or check(A, n, x):
        print("yes")
    else:
        print("no") x m if x > sum(A):
        print("no")
    elif (x in A) or check(A, n, x):
        print("yes")
    else:
        print("no") x > sum(A) x sum(A) sum A print("no") print "no" elif (x in A) or check(A, n, x):
        print("yes")
     (x in A) or check(A, n, x) x in A x A check(A, n, x) check A n x print("yes") print "yes" print("no") print "no" def check(lst, n, x):
    for i in range(2, n+1):
        B = list(itertools.combinations(lst,i))
        for C in B:
            if x == sum(C):
                return True
    return False def check(lst, n, x):
    for i in range(2, n+1):
        B = list(itertools.combinations(lst,i))
        for C in B:
            if x == sum(C):
                return True
    return False check A = [int(i) for i in input().split()] [int(i) for i in input().split()] A q = int(input()) int(input()) q m = [int(i) for i in input().split()] [int(i) for i in input().split()] m n = int(input()) int(input()) n
import itertools

def check(lst, n, x):
    for i in range(2, n+1):
        B = list(itertools.combinations(lst,i))
        for C in B:
            if x == sum(C):
                return True
    return False

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

for x in m:
    if x > sum(A):
        print("no")
    elif (x in A) or check(A, n, x):
        print("yes")
    else:
        print("no")

