while line=gets do
  n,k = line.split.map(&:to_i)
  break if (n|k)==0
  nums = Array.new
  n.times{
    nums<<gets.to_i
  }
  tmp = 0
  ckd=0
  (0..n-k).each{|i|
    if (pro=nums[i,k].inject(1){|product,x| product*x})>ckd
      ckd = pro
      tmp = i
    end
  }

  min = nums.slice!(tmp,k).min
  nums << min
  if max = nums.select{|x| x>=min}.max
    puts ckd/min*max-ckd
  elsif max ==min
    puts 0
  else
    puts "NO GAME"
  end
end