n = int(input())
*li, = map(int, input().split())
input()
*Q, = map(int, input().split())

bits = 1
for i in li:
    # print(f"{i=}")
    # print(f"{bin(bits)=}")
    bits |= bits << i
    # print(f"{bin(bits)=}")
    # print()

# print()
for q in Q:
    # print(f"{bin(bits)=}")
    print("yes"*((bits >> q) & 1) or "no")
    # print()
 n = int(input()) n int(input()) int input() input *li, = map(int, input().split()) *li li map(int, input().split()) map int input().split() ().split () input split input() input *Q, = map(int, input().split()) *Q Q map(int, input().split()) map int input().split() ().split () input split bits = 1 bits 1 for i in li:
    # print(f"{i=}")
    # print(f"{bin(bits)=}")
    bits |= bits << i
    # print(f"{bin(bits)=}")
    # print()

# print() i li bits |= bits << i bits bits << i bits i for q in Q:
    # print(f"{bin(bits)=}")
    print("yes"*((bits >> q) & 1) or "no")
    # print() q Q print("yes"*((bits >> q) & 1) or "no") print "yes"*((bits >> q) & 1) or "no" "yes"*((bits >> q) & 1) "yes" (bits >> q) & 1 bits >> q bits q 1 "no" bits |= bits << i bits << i bits n = int(input()) int(input()) n bits = 1 1 bits
n = int(input())
*li, = map(int, input().split())
input()
*Q, = map(int, input().split())

bits = 1
for i in li:
    # print(f"{i=}")
    # print(f"{bin(bits)=}")
    bits |= bits << i
    # print(f"{bin(bits)=}")
    # print()

# print()
for q in Q:
    # print(f"{bin(bits)=}")
    print("yes"*((bits >> q) & 1) or "no")
    # print()

