#include <stdio.h>

int makeCombination(int ,int );

int num,S[2000];

int main ()
{

  int i,m,q;

  scanf("%d",&num);

  for(i=0;i<num;i++)
    {
      scanf("%d",&S[i]);
    }

  scanf("%d",&q);

  for(i=0;i<q;i++)
    {
      scanf("%d",&m);
    }
  if( makeCombination (0,m)) printf("yes\n");

  else printf("no\n");
  return 0;

}

int makeCombination(int x ,int y )
{
  int res;
  if(x >= num)  return 0;
  if(S[x] == y) return 1;
  if(makeCombination(x+1,y)) return 1;
  if(makeCombination(x+1,y-S[x]))return 1;
  return 0;
}