$stdin.gets.strip
A = $stdin.gets.strip.split(' ').map(&:to_i)
$stdin.gets.strip
ms = $stdin.gets.strip.split(' ').map(&:to_i)

def _solve(i, m)
  if m == 0
    return true
  end

  if i >= A.length
    return false
  end

  return solve(i+1, m) || solve(i+1, m - A[i])
end

@cache = {}
def solve(i, m)
  if res = @cache[[i, m]]
    res
  else
    @cache[[i, m]] = _solve(i, m)
  end
end

ms.each do |m|
  if solve(0, m)
    puts 'yes'
  else
    puts 'no'
  end
end
