#include<iostream>
#include<algorithm>
using namespace std;

int n, k, x[100];

int getpoint() {
	if (n < k) { return 0; }
	int sum = 1, maxd = 1;
	for (int i = 0; i < k; i++) {
		sum *= x[i];
	}
	maxd = sum;
	for (int i = 0; i < n - k; i++) {
		sum /= x[i];
		sum *= x[i + k];
		maxd = max(maxd, sum);
	}
	return maxd;
}

int main() {
	while (true) {
		cin >> n >> k;
		if (n == 0 && k == 0) { break; }
		for (int i = 0; i < n; i++) { cin >> x[i]; }
		int point = getpoint();
		int maxn = 0;
		for (int i = 0; i < n; i++) {
			for (int j = i + 1; j < n; j++) {
				int a = x[i], b = x[j];
				x[j] = a; x[i] = b;
				maxn = max(maxn, getpoint());
				x[i] = a; x[j] = b;
			}
		}
		if (point > maxn) { cout << "NO GAME" << endl; }
		else { cout << maxn - point << endl; }
	}
	return 0;
}