# coding: utf-8
N = int(input())
A = [int(i) for i in input().split()]
q = int(input())
m = [int(i) for i in input().split()]
MAX_LENGTH = len(A)
dp = [[-1 for i in range(max(m) + 1)] for j in range(MAX_LENGTH + 1)]
# i番目以降の値を使ってmを作ればTrueを返す
def fullSearch(i, m):
    # 終了条件
    if m < 0:
        return False
    elif dp[i][m] != -1:
        return dp[i][m]
    elif m == 0:
        return True
    elif i >= MAX_LENGTH:
        return False
    else:
        # 全探索かっこわるい
        res = fullSearch(i + 1, m) or fullSearch(i + 1, m - A[i])
    # のでメモ化
    dp[i][m] = res
    return res
for mi in m:
    print("yes" if fullSearch(0, mi) else "no") 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()] MAX_LENGTH = len(A) MAX_LENGTH len(A) len A [-1 for i in range(max(m) + 1)] for j in range(MAX_LENGTH + 1) for j in range(MAX_LENGTH + 1) j range(MAX_LENGTH + 1) range MAX_LENGTH + 1 MAX_LENGTH 1 for j in range(MAX_LENGTH + 1) [-1 for i in range(max(m) + 1)] dp = [[-1 for i in range(max(m) + 1)] for j in range(MAX_LENGTH + 1)] dp [[-1 for i in range(max(m) + 1)] for j in range(MAX_LENGTH + 1)] def fullSearch(i, m):
    # 終了条件
    if m < 0:
        return False
    elif dp[i][m] != -1:
        return dp[i][m]
    elif m == 0:
        return True
    elif i >= MAX_LENGTH:
        return False
    else:
        # 全探索かっこわるい
        res = fullSearch(i + 1, m) or fullSearch(i + 1, m - A[i])
    # のでメモ化
    dp[i][m] = res
    return res fullSearch if m < 0:
        return False
    elif dp[i][m] != -1:
        return dp[i][m]
    elif m == 0:
        return True
    elif i >= MAX_LENGTH:
        return False
    else:
        # 全探索かっこわるい
        res = fullSearch(i + 1, m) or fullSearch(i + 1, m - A[i])
    # のでメモ化
     m < 0 m 0 return False False elif dp[i][m] != -1:
        return dp[i][m]
     dp[i][m] != -1 dp[i][m] [i] dp i m -1 return dp[i][m] dp[i][m] [i] dp i m elif m == 0:
        return True
     m == 0 m 0 return True True elif i >= MAX_LENGTH:
        return False
     i >= MAX_LENGTH i MAX_LENGTH return False False res = fullSearch(i + 1, m) or fullSearch(i + 1, m - A[i]) res fullSearch(i + 1, m) or fullSearch(i + 1, m - A[i]) fullSearch(i + 1, m) fullSearch i + 1 i 1 m fullSearch(i + 1, m - A[i]) fullSearch i + 1 i 1 m - A[i] m A[i] A i dp[i][m] = res dp[i][m] [i] dp i m res return res res i i m m for mi in m:
    print("yes" if fullSearch(0, mi) else "no") mi m print("yes" if fullSearch(0, mi) else "no") print "yes" if fullSearch(0, mi) else "no" fullSearch(0, mi) fullSearch 0 mi "yes" "no" A = [int(i) for i in input().split()] [int(i) for i in input().split()] A m = [int(i) for i in input().split()] [int(i) for i in input().split()] m def fullSearch(i, m):
    # 終了条件
    if m < 0:
        return False
    elif dp[i][m] != -1:
        return dp[i][m]
    elif m == 0:
        return True
    elif i >= MAX_LENGTH:
        return False
    else:
        # 全探索かっこわるい
        res = fullSearch(i + 1, m) or fullSearch(i + 1, m - A[i])
    # のでメモ化
    dp[i][m] = res
    return res def fullSearch(i, m):
    # 終了条件
    if m < 0:
        return False
    elif dp[i][m] != -1:
        return dp[i][m]
    elif m == 0:
        return True
    elif i >= MAX_LENGTH:
        return False
    else:
        # 全探索かっこわるい
        res = fullSearch(i + 1, m) or fullSearch(i + 1, m - A[i])
    # のでメモ化
    dp[i][m] = res
    return res fullSearch dp = [[-1 for i in range(max(m) + 1)] for j in range(MAX_LENGTH + 1)] [[-1 for i in range(max(m) + 1)] for j in range(MAX_LENGTH + 1)] dp q = int(input()) int(input()) q MAX_LENGTH = len(A) len(A) MAX_LENGTH N = int(input()) int(input()) N
# coding: utf-8
N = int(input())
A = [int(i) for i in input().split()]
q = int(input())
m = [int(i) for i in input().split()]
MAX_LENGTH = len(A)
dp = [[-1 for i in range(max(m) + 1)] for j in range(MAX_LENGTH + 1)]
# i番目以降の値を使ってmを作ればTrueを返す
def fullSearch(i, m):
    # 終了条件
    if m < 0:
        return False
    elif dp[i][m] != -1:
        return dp[i][m]
    elif m == 0:
        return True
    elif i >= MAX_LENGTH:
        return False
    else:
        # 全探索かっこわるい
        res = fullSearch(i + 1, m) or fullSearch(i + 1, m - A[i])
    # のでメモ化
    dp[i][m] = res
    return res
for mi in m:
    print("yes" if fullSearch(0, mi) else "no")