### subroutines

def max_mul(cs, n, k)
  nmk = n - k
  max_ck = 1
  for i in (0..nmk)
    ck = cs[i, k].inject(1){|m, c| m * c}
    max_ck = ck if max_ck < ck
  end
  max_ck
end

### main

loop do
  n, k = gets.split.map(&:to_i)
  break if (n | k) == 0

  cs = n.times.map{gets.to_i}
  #p cs

  max_ck = max_mul(cs, n, k)

  max_ckd = 1

  for i in (0...n)
    for j in ((i + 1)...n)
      cs[i], cs[j] = [cs[j], cs[i]]
      ckd = max_mul(cs, n, k)
      cs[i], cs[j] = [cs[j], cs[i]]
      max_ckd = ckd if max_ckd < ckd
    end
  end

  puts (max_ckd >= max_ck ? max_ckd - max_ck : 'NO GAME')
end