# ALDS1_5_A.

def intinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def binary_search(S, k):
    a = 0; b = len(S) - 1
    if b == 0: return S[0] == k
    while b - a > 1:
        c = (a + b) // 2
        if k <= S[c]: b = c
        else: a = c
    return S[a] == k or S[b] == k

def show(a):
    # 配列aの中身を出力する。
    _str = ""
    for i in range(len(a) - 1): _str += str(a[i]) + " "
    _str += str(a[len(a) - 1])
    print(_str)

def main():
    n = int(input())
    A = intinput()
    q = int(input())
    m = intinput()
    # 配列Aの作る数を調べる。
    nCanMake = [0]
    for i in range(n):
        for k in range(len(nCanMake)):
            x = nCanMake[k] + A[i]
            if not x in nCanMake: nCanMake.append(x)
    # show(nCanMake)
    for i in range(q):
        if m[i] in nCanMake: print("yes")
        else: print("no")

if __name__ == "__main__":
    main() def intinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a intinput a = input().split() a input().split() ().split () input split for i in range(len(a)):
        a[i] = int(a[i])
     i range(len(a)) range len(a) len a a[i] = int(a[i]) a[i] a i int(a[i]) int a[i] a i return a a def binary_search(S, k):
    a = 0; b = len(S) - 1
    if b == 0: return S[0] == k
    while b - a > 1:
        c = (a + b) // 2
        if k <= S[c]: b = c
        else: a = c
    return S[a] == k or S[b] == k binary_search a = 0 a 0 b = len(S) - 1 b len(S) - 1 len(S) len S 1 if b == 0: return S[0] == k
     b == 0 b 0 while b - a > 1:
        c = (a + b) // 2
        if k <= S[c]: b = c
        else: a = c
     b - a > 1 b - a b a 1 c = (a + b) // 2 c (a + b) // 2 a + b a b 2 if k <= S[c]: b = c
        else: a = c
     k <= S[c] k S[c] S c return S[a] == k or S[b] == k S[a] == k or S[b] == k S[a] == k S[a] S a k S[b] == k S[b] S b k S S k k def show(a):
    # 配列aの中身を出力する。
    _str = ""
    for i in range(len(a) - 1): _str += str(a[i]) + " "
    _str += str(a[len(a) - 1])
    print(_str) show _str = "" _str "" for i in range(len(a) - 1): _str += str(a[i]) + " "
     i range(len(a) - 1) range len(a) - 1 len(a) len a 1 _str += str(a[len(a) - 1]) _str str(a[len(a) - 1]) str a[len(a) - 1] a len(a) - 1 len(a) len a 1 print(_str) print _str a a def main():
    n = int(input())
    A = intinput()
    q = int(input())
    m = intinput()
    # 配列Aの作る数を調べる。
    nCanMake = [0]
    for i in range(n):
        for k in range(len(nCanMake)):
            x = nCanMake[k] + A[i]
            if not x in nCanMake: nCanMake.append(x)
    # show(nCanMake)
    for i in range(q):
        if m[i] in nCanMake: print("yes")
        else: print("no") main n = int(input()) n int(input()) int input() input A = intinput() A intinput() intinput q = int(input()) q int(input()) int input() input m = intinput() m intinput() intinput nCanMake = [0] nCanMake [0] 0 for i in range(n):
        for k in range(len(nCanMake)):
            x = nCanMake[k] + A[i]
            if not x in nCanMake: nCanMake.append(x)
    # show(nCanMake)
     i range(n) range n for k in range(len(nCanMake)):
            x = nCanMake[k] + A[i]
            if not x in nCanMake: nCanMake.append(x)
    # show(nCanMake)
     k range(len(nCanMake)) range len(nCanMake) len nCanMake x = nCanMake[k] + A[i] x nCanMake[k] + A[i] nCanMake[k] nCanMake k A[i] A i if not x in nCanMake: nCanMake.append(x)
    # show(nCanMake)
     not x in nCanMake x in nCanMake x nCanMake for i in range(q):
        if m[i] in nCanMake: print("yes")
        else: print("no") i range(q) range q if m[i] in nCanMake: print("yes")
        else: print("no") m[i] in nCanMake m[i] m i nCanMake if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def show(a):
    # 配列aの中身を出力する。
    _str = ""
    for i in range(len(a) - 1): _str += str(a[i]) + " "
    _str += str(a[len(a) - 1])
    print(_str) def show(a):
    # 配列aの中身を出力する。
    _str = ""
    for i in range(len(a) - 1): _str += str(a[i]) + " "
    _str += str(a[len(a) - 1])
    print(_str) show def binary_search(S, k):
    a = 0; b = len(S) - 1
    if b == 0: return S[0] == k
    while b - a > 1:
        c = (a + b) // 2
        if k <= S[c]: b = c
        else: a = c
    return S[a] == k or S[b] == k def binary_search(S, k):
    a = 0; b = len(S) - 1
    if b == 0: return S[0] == k
    while b - a > 1:
        c = (a + b) // 2
        if k <= S[c]: b = c
        else: a = c
    return S[a] == k or S[b] == k binary_search def main():
    n = int(input())
    A = intinput()
    q = int(input())
    m = intinput()
    # 配列Aの作る数を調べる。
    nCanMake = [0]
    for i in range(n):
        for k in range(len(nCanMake)):
            x = nCanMake[k] + A[i]
            if not x in nCanMake: nCanMake.append(x)
    # show(nCanMake)
    for i in range(q):
        if m[i] in nCanMake: print("yes")
        else: print("no") def main():
    n = int(input())
    A = intinput()
    q = int(input())
    m = intinput()
    # 配列Aの作る数を調べる。
    nCanMake = [0]
    for i in range(n):
        for k in range(len(nCanMake)):
            x = nCanMake[k] + A[i]
            if not x in nCanMake: nCanMake.append(x)
    # show(nCanMake)
    for i in range(q):
        if m[i] in nCanMake: print("yes")
        else: print("no") main def intinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a def intinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a intinput
# ALDS1_5_A.

def intinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def binary_search(S, k):
    a = 0; b = len(S) - 1
    if b == 0: return S[0] == k
    while b - a > 1:
        c = (a + b) // 2
        if k <= S[c]: b = c
        else: a = c
    return S[a] == k or S[b] == k

def show(a):
    # 配列aの中身を出力する。
    _str = ""
    for i in range(len(a) - 1): _str += str(a[i]) + " "
    _str += str(a[len(a) - 1])
    print(_str)

def main():
    n = int(input())
    A = intinput()
    q = int(input())
    m = intinput()
    # 配列Aの作る数を調べる。
    nCanMake = [0]
    for i in range(n):
        for k in range(len(nCanMake)):
            x = nCanMake[k] + A[i]
            if not x in nCanMake: nCanMake.append(x)
    # show(nCanMake)
    for i in range(q):
        if m[i] in nCanMake: print("yes")
        else: print("no")

if __name__ == "__main__":
    main()
