#include <set>
#include <cstdio>
#include <queue>
#define REP(i,n) for(int i=0; i<(int)(n); i++)

inline int getInt(){ int s; scanf("%d", &s); return s; }

using namespace std;

int calc(const vector<int> &a, int k){
  const int n = a.size();
  int c = 0;
  REP(i,n - k + 1){
    int s = 1;
    REP(j,k) s *= a[i + j];
    c = max(c, s);
  }
  return c;
}

int main(){
  while(true){
    const int n = getInt();
    const int k = getInt();

    if(n + k == 0) break;

    vector<int> a(n);
    REP(i,n) a[i] = getInt();
    const int c = calc(a, k);

    int cc = 0;
    REP(i,n) for(int j = i + 1; j < n; j++){
      swap(a[i], a[j]);
      cc = max(cc, calc(a, k));
      swap(a[i], a[j]);
    }

    if(cc >= c) printf("%d\n", cc - c);
    else puts("NO GAME");
  }

  return 0;
}