#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit
#include <cstdio>	// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>	// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()
#define DEBUG 0

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

int main()
{
	int n, k;
	while (scanf ("%d %d", &n, &k ) && n && k ){
		vector<int> card (n, 0 );

		rep (i, n ){
			cin >> card[i];
		} // end rep

		int res = 0;
		for (int i = 0; i <= n-k; i++ ){
			int curr = 1;
			for (int j = i; j < i+k; j++ ){
				curr *= card[j];
			} // end for
			res = max (curr, res );
		} // end for

		int ans = 0;
		for (int i = 0; i < n; i++ ){
			for (int j = i+1; j < n; j++ ){
				swap (card[i], card[j] );
				for (int m = 0; m <= n-k; m++ ){
					int curr = 1;
					for (int l = m; l < m+k; l++ ){
						curr *= card[l];
					} // end for
					if (ans < curr ){
						ans = curr;
					} // end if
				} // end for
				swap (card[i], card[j] );
			} // end for
		} // end for
		if (res > ans ){
			cout << "NO GAME" << endl;
		}else{
			cout << ans - res << endl;
		} // end if
	} // end while			
		
	return 0;
}