#include <iostream>
#include <cstdio>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <bitset>
#include <stack>
#include <utility>
#include <numeric>
#include <algorithm>
#include <functional>
#include <cctype>
#include <complex>
#include <string>
#include <sstream>

using namespace std;

#define all(c) c.begin(),c.end()
#define rall(c) c.rbegin(),c.rend()
#define rep(i,n) for(int i=0;i<(n);i++)
#define tr(it,container) for(typeof(container.begin()) it = container.begin(); \
                                                  it != container.end(); ++it)
#define mp(a,b) make_pair((a),(b))
#define eq ==

typedef long long ll;
typedef complex<double> point;
typedef pair<int,int> pii;

// →↑←↓
const int dx[] = {1,0,-1,0};
const int dy[] = {0,-1,0,1};


const double EPS = 1e-9;


int main(){
    while(true){
        int n,k;
        cin >> n >> k;
        if(n == 0) break;

        vector<int> C(n);
        for(int i=0;i<n;i++){
            cin >> C[i];
        }

        ll sensei = -1;
        {
            ll now = 1;
            for(int l=0;l<k;l++){
                now *= C[l];
            }
            sensei = max(sensei,now);

            for(int l=k;l<n;l++){
                now /= C[l-k];
                now *= C[l];
                sensei = max(sensei,now);
            }
        }

        ll maxi = -1;
        for(int i=0;i<n;i++){
            for(int j=i+1;j<n;j++){

                swap(C[i],C[j]);

                ll now = 1;
                for(int l=0;l<k;l++){
                    now *= C[l];
                }
                maxi = max(maxi,now);

                for(int l=k;l<n;l++){
                    now /= C[l-k];
                    now *= C[l];
                    maxi = max(maxi,now);
                }
                swap(C[i],C[j]);
            }
        }
        if(maxi < sensei){
            cout << "NO GAME" << endl;
        }else{
            cout << maxi - sensei << endl;
        }
    }
    return 0;
}