#include <stdio.h>

int solve( int ,int ) ;
int m, a[20], ans = 0 ;
int main () {
	
	int m[200], i, j, q, n;
	int count = 0 ;

	
	scanf ("%d",&n) ;
	for ( i = 0 ; i < n ; i ++ ) {
		scanf("%d", &a[i] ) ;
	}
	scanf ("%d",&q) ;
	for ( i = 0 ; i < q ; i ++ ) {
		scanf("%d", &m[i] ) ;
	}
	
	
	for ( j = 0 ; j < q ; j++) {
		ans = 0 ;
		solve ( 0 , m[j] );
		if ( ans == 1 ) {
			printf("yes\n");
		}
		else { 
			printf("nod\n");
		}
	}
	
return 0 ;
}


int solve( int j ,int m ) {
	if (m == 0 ) {
		ans =  1;
		return 1 ; 
	}
	
	if ( j < n ) {
		solve( j + 1 , m) ;
		solve( j + 1 , m - a[j]) ;
	}
}



 