#include <iostream>
#include <algorithm>

using namespace std;

#define REP(i, n) for (int i = 0; i < (n); ++i)

const int N_MAX = 100;

int n, k;
int c[N_MAX];

int f() 
{
    int res = 0;
    REP(i, n-k+1) {
        int x = 1;
        REP(j, k) x *= c[i+j];
        res = max(res, x);
    }
    return res;
}
    
void solve()
{
    int ck = f();
    int ans = 0;
    REP(i, n) REP(j, n) if (i != j) {
        swap(c[i], c[j]);
        ans = max(ans, f()-ck);
        swap(c[i], c[j]);        
    }
    if (ans < 0) cout << "NO GAME" << endl;
    else cout << ans << endl;
}

int main()
{
    while (cin >> n >> k, n) {
        REP(i, n) cin >> c[i];
        solve();
    }
    return 0;
}
