#include <stdio.h>

int main() {
	int addNumber[20];
	int ansNumber[200];
	int needAddN, needAnsN;
	int YorN;
	int i, j;

	scanf("%d", &needAddN);
	for (i = 0; i < needAddN; i++) {
		scanf("%d", &addNumber[i]);
	}
	scanf("%d", &needAnsN);
	for (i = 0; i < needAnsN; i++) {
		scanf("%d", &ansNumber[i]);
	}

	for (i = 0; i < needAnsN; i++) {
		int addBox;
		int down; //??°????????°????????????????????????
		down = -1;
		for (j = needAddN - 1; j >= 0; j--) {
			down++;
			addBox = 0;
			YorN = calc(ansNumber[i], addNumber, needAddN - down, addBox);
			if (YorN == 1) {
				break;
			}
		}
		if (YorN == 1) {
			printf("yes\n");
		}
		else {
			printf("no\n");
		}
	}

	return 0;
}

int calc (int answer, int* addNumber, int count, int addBox) {
	int trueA;
	if (addBox > answer || count < 0) {
		return -1;
	}

	do {
		count--;
		if (count < 0) {
			return -1;
		}
		addBox += addNumber[count];
		if (addBox == answer) {
			trueA = 1;
		}
		else {
			trueA = calc(answer, addNumber, count, addBox);
			addBox -= addNumber[count];
		}
	} while (trueA == -1);

	return 1;
}