#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <sstream>
#include <map>
#include <set>

#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define INF 1<<30
#define pb push_back
#define mp make_pair

using namespace std;
typedef long long ll;
typedef pair<int,int> P;

int n, k;

ll f(vector<int> v) {
	ll ret = 0, res = 1;
	int i;
	for(i = 0; i < k; i++) {
		res *= v[i];
	}
	ret = res;

	for(; i < n; i++) {
		res *= v[i];
		res /= v[i-k];
		ret = max(ret, res);
	}
	return ret;
}

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

		vector<int> v(n);
		rep(i, n) cin >> v[i];

		ll x = f(v);
		ll ans = -INF;

		rep(i, n) {
			REP(j, i+1, n) {
				swap(v[i], v[j]);
				ans = max(ans, f(v) - x);
				swap(v[i], v[j]);
			}
		}

		if(ans >= 0) cout << ans << endl;
		else cout << "NO GAME" << endl;
	}

	return 0;
}