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(" ")]
dp = [0 for n in range(2001)]
for a in a_ar:
    new_dp = dp[:]
    new_dp[a] = 1
    for i,d in enumerate(dp):
        if d and i + a <= 2000:
            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(" ")] 0 for n in range(2001) for n in range(2001) n range(2001) range 2001 for n in range(2001) 0 dp = [0 for n in range(2001)] dp [0 for n in range(2001)] for a in a_ar:
    new_dp = dp[:]
    new_dp[a] = 1
    for i,d in enumerate(dp):
        if d and i + a <= 2000:
            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 <= 2000:
            new_dp[i + a] = 1
     i d enumerate(dp) enumerate dp if d and i + a <= 2000:
            new_dp[i + a] = 1
     d and i + a <= 2000 d i + a <= 2000 i + a i a 2000 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" b_ar = [int(n) for n in input().split(" ")] [int(n) for n in input().split(" ")] b_ar dp = new_dp new_dp dp dp = [0 for n in range(2001)] [0 for n in range(2001)] dp b_len = int(input()) int(input()) b_len new_dp = dp[:] dp[:] new_dp a_len = int(input()) int(input()) a_len a_ar = sorted([int(n) for n in input().split(" ")]) sorted([int(n) for n in input().split(" ")]) a_ar
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(" ")]
dp = [0 for n in range(2001)]
for a in a_ar:
    new_dp = dp[:]
    new_dp[a] = 1
    for i,d in enumerate(dp):
        if d and i + a <= 2000:
            new_dp[i + a] = 1
    dp = new_dp
for b in b_ar:
    if dp[b]:
        print("yes")
    else:
        print("no")