#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;

int c[100];
int main() {
	int n, k;
	while (scanf("%d%d", &n, &k), n) {
		rep(i, n)scanf("%d", &c[i]);
		int a = 0, b = 0;
		for (int i = 0; i <= n - k; i++) {
			int r = 1; rep(j, k)r *= c[i + j];
			a = max(a, r);
		}
		rep(i, n)for (int j = i + 1; j < n; j++) {
			swap(c[i], c[j]);
			for (int i = 0; i <= n - k; i++) {
				int r = 1; rep(j, k)r *= c[i + j];
				b = max(b, r);
			}
			swap(c[i], c[j]);
		}
		if (b < a)puts("NO GAME");
		else printf("%d\n", b - a);
	}
}