def compose_number?(array, num)
  if array.size == 1
    return array[0] == num
  end
  return true if compose_number?(array[1..-1], num)
  return true  if num - array[0] == 0
  true if compose_number?(array[1..-1], num - array[0])
end

input = []
while (n = gets.to_i) != 0 do
  input << gets.split.map(&:to_i)
end
ss = input[0]
tt = input[1]
result = tt.map do |i|
  if compose_number?(ss, i)
    'yes'
  else
    'no'
  end
end
result.each do |i|
  puts i
end

