def exhaustiveSearch(A:list, m:int) -> str:
    if m == 0:
        return True
    if len(A) == 0 or sum(A) < m:
        return False
    return exhaustiveSearch(A[1:], m) or exhaustiveSearch(A[1:], m - A[0])
    


if __name__ == '__main__':
    n = int(input())
    A = list(map(int, input().rstrip().split()))
    q = int(input())
    M = list(map(int, input().rstrip().split()))
    for m in M:
        if exhaustiveSearch(A, m):
            print('yes')
        else:
            print('no') def exhaustiveSearch(A:list, m:int) -> str:
    if m == 0:
        return True
    if len(A) == 0 or sum(A) < m:
        return False
    return exhaustiveSearch(A[1:], m) or exhaustiveSearch(A[1:], m - A[0])
     exhaustiveSearch if m == 0:
        return True
     m == 0 m 0 return True True if len(A) == 0 or sum(A) < m:
        return False
     len(A) == 0 or sum(A) < m len(A) == 0 len(A) len A 0 sum(A) < m sum(A) sum A m return False False return exhaustiveSearch(A[1:], m) or exhaustiveSearch(A[1:], m - A[0]) exhaustiveSearch(A[1:], m) or exhaustiveSearch(A[1:], m - A[0]) exhaustiveSearch(A[1:], m) exhaustiveSearch A[1:] A 1: 1 m exhaustiveSearch(A[1:], m - A[0]) exhaustiveSearch A[1:] A 1: 1 m - A[0] m A[0] A 0 A:list A m:int m if __name__ == '__main__':
    n = int(input())
    A = list(map(int, input().rstrip().split()))
    q = int(input())
    M = list(map(int, input().rstrip().split()))
    for m in M:
        if exhaustiveSearch(A, m):
            print('yes')
        else:
            print('no') __name__ == '__main__' __name__ '__main__' n = int(input()) n int(input()) int input() input A = list(map(int, input().rstrip().split())) A list(map(int, input().rstrip().split())) list map(int, input().rstrip().split()) map int input().rstrip().split() ().rstrip().split ().rstrip() ().rstrip () input rstrip split q = int(input()) q int(input()) int input() input M = list(map(int, input().rstrip().split())) M list(map(int, input().rstrip().split())) list map(int, input().rstrip().split()) map int input().rstrip().split() ().rstrip().split ().rstrip() ().rstrip () input rstrip split for m in M:
        if exhaustiveSearch(A, m):
            print('yes')
        else:
            print('no') m M if exhaustiveSearch(A, m):
            print('yes')
        else:
            print('no') exhaustiveSearch(A, m) exhaustiveSearch A m print('yes') print 'yes' print('no') print 'no' q = int(input()) int(input()) q A = list(map(int, input().rstrip().split())) list(map(int, input().rstrip().split())) A def exhaustiveSearch(A:list, m:int) -> str:
    if m == 0:
        return True
    if len(A) == 0 or sum(A) < m:
        return False
    return exhaustiveSearch(A[1:], m) or exhaustiveSearch(A[1:], m - A[0])
     def exhaustiveSearch(A:list, m:int) -> str:
    if m == 0:
        return True
    if len(A) == 0 or sum(A) < m:
        return False
    return exhaustiveSearch(A[1:], m) or exhaustiveSearch(A[1:], m - A[0])
     exhaustiveSearch M = list(map(int, input().rstrip().split())) list(map(int, input().rstrip().split())) M n = int(input()) int(input()) n
def exhaustiveSearch(A:list, m:int) -> str:
    if m == 0:
        return True
    if len(A) == 0 or sum(A) < m:
        return False
    return exhaustiveSearch(A[1:], m) or exhaustiveSearch(A[1:], m - A[0])
    


if __name__ == '__main__':
    n = int(input())
    A = list(map(int, input().rstrip().split()))
    q = int(input())
    M = list(map(int, input().rstrip().split()))
    for m in M:
        if exhaustiveSearch(A, m):
            print('yes')
        else:
            print('no')
