A_count = int(input());
A = [int(n) for n in input().split()];
M_count = int(input());
M = [int(n) for n in input().split()];

memo = [[None for i in range(2000)] for j in range(A_count + 1)];

def solve(start, target):
    if memo[start][target] is not None:
        return memo[start][target];
    if target == 0:
        return True;
    elif start >= A_count:
        return False;
    else:
        result = solve(start + 1, target) or solve(start + 1, target - A[start]);
        if result:
            memo[start][target] = True;
            return True;
        else:
            memo[start][target] = False;
            return False;

for m in M:
    if solve(0, m):
        print("yes");
    else:
        print("no"); A_count = int(input()) A_count 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 = [int(n) for n in input().split()] A [int(n) for n in input().split()] M_count = int(input()) M_count 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 M = [int(n) for n in input().split()] M [int(n) for n in input().split()] [None for i in range(2000)] for j in range(A_count + 1) for j in range(A_count + 1) j range(A_count + 1) range A_count + 1 A_count 1 for j in range(A_count + 1) [None for i in range(2000)] memo = [[None for i in range(2000)] for j in range(A_count + 1)] memo [[None for i in range(2000)] for j in range(A_count + 1)] def solve(start, target):
    if memo[start][target] is not None:
        return memo[start][target];
    if target == 0:
        return True;
    elif start >= A_count:
        return False;
    else:
        result = solve(start + 1, target) or solve(start + 1, target - A[start]);
        if result:
            memo[start][target] = True;
            return True;
        else:
            memo[start][target] = False;
            return False; solve if memo[start][target] is not None:
        return memo[start][target];
     memo[start][target] is not None memo[start][target] [start] memo start target None return memo[start][target] memo[start][target] [start] memo start target if target == 0:
        return True;
    elif start >= A_count:
        return False;
    else:
        result = solve(start + 1, target) or solve(start + 1, target - A[start]);
        if result:
            memo[start][target] = True;
            return True;
        else:
            memo[start][target] = False;
            return False; target == 0 target 0 return True True elif start >= A_count:
        return False;
     start >= A_count start A_count return False False result = solve(start + 1, target) or solve(start + 1, target - A[start]) result solve(start + 1, target) or solve(start + 1, target - A[start]) solve(start + 1, target) solve start + 1 start 1 target solve(start + 1, target - A[start]) solve start + 1 start 1 target - A[start] target A[start] A start if result:
            memo[start][target] = True;
            return True;
        else:
            memo[start][target] = False;
            return False; result memo[start][target] = True memo[start][target] [start] memo start target True return True True memo[start][target] = False memo[start][target] [start] memo start target False return False False start start target target for m in M:
    if solve(0, m):
        print("yes");
    else:
        print("no"); m M if solve(0, m):
        print("yes");
    else:
        print("no"); solve(0, m) solve 0 m print("yes") print "yes" print("no") print "no" A_count = int(input()) int(input()) A_count A = [int(n) for n in input().split()] [int(n) for n in input().split()] A memo = [[None for i in range(2000)] for j in range(A_count + 1)] [[None for i in range(2000)] for j in range(A_count + 1)] memo def solve(start, target):
    if memo[start][target] is not None:
        return memo[start][target];
    if target == 0:
        return True;
    elif start >= A_count:
        return False;
    else:
        result = solve(start + 1, target) or solve(start + 1, target - A[start]);
        if result:
            memo[start][target] = True;
            return True;
        else:
            memo[start][target] = False;
            return False; def solve(start, target):
    if memo[start][target] is not None:
        return memo[start][target];
    if target == 0:
        return True;
    elif start >= A_count:
        return False;
    else:
        result = solve(start + 1, target) or solve(start + 1, target - A[start]);
        if result:
            memo[start][target] = True;
            return True;
        else:
            memo[start][target] = False;
            return False; solve M = [int(n) for n in input().split()] [int(n) for n in input().split()] M M_count = int(input()) int(input()) M_count
A_count = int(input());
A = [int(n) for n in input().split()];
M_count = int(input());
M = [int(n) for n in input().split()];

memo = [[None for i in range(2000)] for j in range(A_count + 1)];

def solve(start, target):
    if memo[start][target] is not None:
        return memo[start][target];
    if target == 0:
        return True;
    elif start >= A_count:
        return False;
    else:
        result = solve(start + 1, target) or solve(start + 1, target - A[start]);
        if result:
            memo[start][target] = True;
            return True;
        else:
            memo[start][target] = False;
            return False;

for m in M:
    if solve(0, m):
        print("yes");
    else:
        print("no");
