a_len = int(input())
a_ar = sorted([int(n) for n in input().split(" ")])
b_len = int(input())
b_ar = [int(n) for n in input().split(" ")]
max_b = max(b_ar)
dp = [0 for n in range(max_b + 1)]
for a in a_ar:
    new_dp = dp[:]
    new_dp[a] = 1
    for i,d in enumerate(dp):
        if d and i + a <= max_b:
            new_dp[i + a] = 1
    dp = new_dp
for b in b_ar:
    if dp[b]:
        print("yes")
    else:
        print("no") a_len = int(input()) a_len int(input()) int input() input int(n) for n in input().split(" ") for n in input().split(" ") n input().split(" ") ().split () input split " " for n in input().split(" ") int(n) int n a_ar = sorted([int(n) for n in input().split(" ")]) a_ar sorted([int(n) for n in input().split(" ")]) sorted [int(n) for n in input().split(" ")] b_len = int(input()) b_len int(input()) int input() input int(n) for n in input().split(" ") for n in input().split(" ") n input().split(" ") ().split () input split " " for n in input().split(" ") int(n) int n b_ar = [int(n) for n in input().split(" ")] b_ar [int(n) for n in input().split(" ")] max_b = max(b_ar) max_b max(b_ar) max b_ar 0 for n in range(max_b + 1) for n in range(max_b + 1) n range(max_b + 1) range max_b + 1 max_b 1 for n in range(max_b + 1) 0 dp = [0 for n in range(max_b + 1)] dp [0 for n in range(max_b + 1)] for a in a_ar:
    new_dp = dp[:]
    new_dp[a] = 1
    for i,d in enumerate(dp):
        if d and i + a <= max_b:
            new_dp[i + a] = 1
    dp = new_dp a a_ar new_dp = dp[:] new_dp dp[:] dp : new_dp[a] = 1 new_dp[a] new_dp a 1 for i,d in enumerate(dp):
        if d and i + a <= max_b:
            new_dp[i + a] = 1
     i d enumerate(dp) enumerate dp if d and i + a <= max_b:
            new_dp[i + a] = 1
     d and i + a <= max_b d i + a <= max_b i + a i a max_b new_dp[i + a] = 1 new_dp[i + a] new_dp i + a i a 1 dp = new_dp dp new_dp for b in b_ar:
    if dp[b]:
        print("yes")
    else:
        print("no") b b_ar if dp[b]:
        print("yes")
    else:
        print("no") dp[b] dp b print("yes") print "yes" print("no") print "no" new_dp = dp[:] dp[:] new_dp max_b = max(b_ar) max(b_ar) max_b a_len = int(input()) int(input()) a_len dp = [0 for n in range(max_b + 1)] [0 for n in range(max_b + 1)] dp a_ar = sorted([int(n) for n in input().split(" ")]) sorted([int(n) for n in input().split(" ")]) a_ar b_ar = [int(n) for n in input().split(" ")] [int(n) for n in input().split(" ")] b_ar b_len = int(input()) int(input()) b_len dp = new_dp new_dp dp
a_len = int(input())
a_ar = sorted([int(n) for n in input().split(" ")])
b_len = int(input())
b_ar = [int(n) for n in input().split(" ")]
max_b = max(b_ar)
dp = [0 for n in range(max_b + 1)]
for a in a_ar:
    new_dp = dp[:]
    new_dp[a] = 1
    for i,d in enumerate(dp):
        if d and i + a <= max_b:
            new_dp[i + a] = 1
    dp = new_dp
for b in b_ar:
    if dp[b]:
        print("yes")
    else:
        print("no")