let content = '';
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', buf => {
  content += buf;
});

process.stdin.on('end', () => {
  const [nums, sums] = content
    .trim()
    .split('\n')
    .filter((line, i) => i % 2 === 1)
    .map(nums => nums.split(' ').map(n => +n));

  for (const sum of sums) {
    const result = solve(sum, nums, 0);
    console.log(result ? 'yes' : 'no');
  }
});

const memoize = fn => {
  const memo = {};
  return (...args) => {
    const key = JSON.stringify(args);
    if (!(key in memo)) {
      memo[key] = fn(...args);
    }

    return memo[key];
  };
};

const solve = memoize((sum, nums, offset) => {
  if (sum === 0) {
    return true;
  } else if (offset >= nums.length) {
    return false;
  }

  return (
    solve(sum, nums, offset + 1) || solve(sum - nums[offset], nums, offset + 1)
  );
});
