
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stack>
#include <cctype>
#include <complex>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <cassert>

using namespace std;

int f(int n, int k, vector<int> a){
	int c1 = 0;
	for(int i=0;i<=n-k;i++){
		int num = 1;
		for(int j=0;j<k;j++){
			num *= a[i+j];
		}
		c1 = max(c1, num);
	}
	return c1;
}

bool solve(){
	int n, k;
	cin>> n>> k;
	if(n==0 && k==0) return false;
	vector<int> a(n);
	for(int i=0;i<n;i++){
		cin>> a[i];
	}
	int c1 = f(n, k, a);
	//cout<< c1<< endl;
	int ans = -1;
	for(int i=0;i<n-1;i++){
		for(int j=i+1;j<n;j++){
			vector<int> b = a;
			swap(b[i],b[j]);
			int c2 = f(n, k, b);
			if(c2 >= c1) ans = max(ans, c2-c1);
		}
	}
	if(ans != -1){
		cout<< ans<< endl;
	}else{
		cout<< "NO GAME"<< endl;
	}
	
	return true;
}

int main(){
	cout.setf(ios::fixed);
	cout.precision(10);
	while(solve());

	return 0;
}

 