#include<cstdio>
#include<algorithm>

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

using namespace std;

int n,k,card[100];

int calc(){
	int res=0;
	rep(i,n-k+1){
		int tmp=1;
		for(int j=i;j<i+k;j++) tmp*=card[j];
		res=max(res,tmp);
	}
	return res;
}

int main(){
	for(;scanf("%d%d",&n,&k),n;){
		rep(i,n) scanf("%d",card+i);

		int c1=calc(),c2=0;
		rep(i,n) rep(j,i) {
			swap(card[i],card[j]);
			c2=max(c2,calc());
			swap(card[i],card[j]);
		}
		if(c2>=c1) printf("%d\n",c2-c1); else puts("NO GAME");
	}

	return 0;
}