#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <utility>
#include <cctype>
#include <numeric>
using namespace std;

#define rep(i,n) for(int (i)=0; (i)<(int)(n); ++(i))
#define foreach(c,i) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)

int N, K, C[102];

int main() {
  while (-1 != scanf("%d%d", &N, &K)) {
    if (!(N)) break;
    rep(i,N) scanf("%d",C+i);
    int mx = -1, ckd = -1;
    rep(i,N-K+1) {
      int sm = 1;
      rep(j,K) sm *= C[i+j];
      ckd = max(ckd, sm);
    }
    rep(i,N) {
      for (int j = i+1; j < N; ++j) {
        swap(C[i], C[j]);
        rep(k,N-K+1) {
          int sm = 1;
          rep(l,K) sm *= C[k+l];
          mx = max(mx, sm);
        }
        swap(C[i], C[j]);
      }
    }
    if (ckd <= mx) printf("%d\n", mx - ckd); else puts("NO GAME");
  }
  return 0;
}