#include <iostream>
#include <algorithm>

using namespace std;

int c[101], n, k;

int func(int p, int q)
{
  int mx = 1, t;
  for(int i = 0; i < k; ++i) mx *= c[i];

  t = mx;
  for(int i = p+k; i <= q; ++i){
    t /= c[i-k];
    t *= c[i];
    mx = max(t, mx);
  }

  return mx;
}

int func()
{
  int mx = 1, t;

  for(int i = 0; i < n-k+1; ++i){
    t = 1;
    for(int j = 0; j < k; ++j) t *= c[i+j];
    mx = max(t, mx);
  }

  return mx;
}

int main()
{
  int cmx, s, t, p, q;

  while(cin>>n>>k && n+k){
    cmx = 1;
    for(int i = 0; i < n; ++i) cin >> c[i];

    t = 1;
    cmx = func();
    for(int i = 0; i < n; ++i){
      for(int j = 0; j < n; ++j){
	if(i == j) continue;
	swap(c[i], c[j]);
	// p = max(j-k, 0);
	// q = min(j+k, n);
	// t = max(t, func(p, q));
	t = max(t, func());
	swap(c[i], c[j]);
      }
    }


    if(t < cmx) cout << "NO GAME" << endl;
    else cout << (t-cmx) << endl;
  }

  return 0;
}