let inputString = '';

process.stdin.on('data', (input) => { inputString += input; });

process.stdin.on('end', () => {
  const arr = inputString.split('\n');
  check(arr[1].split(' ').map((s) => Number(s)), arr[3].split(' ').map((s) => Number(s)));
});

const check = (A, mList) => {
  const solve = (i, m) => {
    if (m === 0) return true;

    if (i >= A.length) return false;

    // solve(i + 1, m) is the case which does not use A[i] in the addition
    // solve(i + 1, m - A[i]) is the case which uses A[i] in the addition
    return solve(i + 1, m) || solve(i + 1, m - A[i]);
  };

  mList.forEach((m) => {
    console.log(solve(0, m) ? 'yes' : 'no');
  });
};


