from collections import deque

def main():
    n = input()
    A = deque(map(int,raw_input().split()))
    q = input()
    M = map(int,raw_input().split())

    p = rec([0],A)

    for m in M:
        if m in p:
            print "yes"
        else:
            print "no"

def rec(a,A):
    if len(A) == 0:
        return a
    else:
        y = A.popleft()
        a = a+[x+y for x in a]
        return rec(a,A)

if __name__ == "__main__":
    main() from collections import deque def main():
    n = input()
    A = deque(map(int,raw_input().split()))
    q = input()
    M = map(int,raw_input().split())

    p = rec([0],A)

    for m in M:
        if m in p:
            print "yes"
        else:
            print "no" main n = input() n input() input A = deque(map(int,raw_input().split())) A deque(map(int,raw_input().split())) deque map(int,raw_input().split()) map int raw_input().split() ().split () raw_input split q = input() q input() input M = map(int,raw_input().split()) M map(int,raw_input().split()) map int raw_input().split() ().split () raw_input split p = rec([0],A) p rec([0],A) rec [0] 0 A for m in M:
        if m in p:
            print "yes"
        else:
            print "no" m M if m in p:
            print "yes"
        else:
            print "no" m in p m p print print def rec(a,A):
    if len(A) == 0:
        return a
    else:
        y = A.popleft()
        a = a+[x+y for x in a]
        return rec(a,A) rec if len(A) == 0:
        return a
    else:
        y = A.popleft()
        a = a+[x+y for x in a]
        return rec(a,A) len(A) == 0 len(A) len A 0 return a a y = A.popleft() y A.popleft() A.popleft A popleft x+y for x in a for x in a x a for x in a x+y x y a = a+[x+y for x in a] a a+[x+y for x in a] a [x+y for x in a] return rec(a,A) rec(a,A) rec a A a a A A if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    n = input()
    A = deque(map(int,raw_input().split()))
    q = input()
    M = map(int,raw_input().split())

    p = rec([0],A)

    for m in M:
        if m in p:
            print "yes"
        else:
            print "no" def main():
    n = input()
    A = deque(map(int,raw_input().split()))
    q = input()
    M = map(int,raw_input().split())

    p = rec([0],A)

    for m in M:
        if m in p:
            print "yes"
        else:
            print "no" main def rec(a,A):
    if len(A) == 0:
        return a
    else:
        y = A.popleft()
        a = a+[x+y for x in a]
        return rec(a,A) def rec(a,A):
    if len(A) == 0:
        return a
    else:
        y = A.popleft()
        a = a+[x+y for x in a]
        return rec(a,A) rec
from collections import deque

def main():
    n = input()
    A = deque(map(int,raw_input().split()))
    q = input()
    M = map(int,raw_input().split())

    p = rec([0],A)

    for m in M:
        if m in p:
            print "yes"
        else:
            print "no"

def rec(a,A):
    if len(A) == 0:
        return a
    else:
        y = A.popleft()
        a = a+[x+y for x in a]
        return rec(a,A)

if __name__ == "__main__":
    main()