//O(N^2 * NK)やる。
#include<iostream>
using namespace std;

int n, p;
int c[114];

int getscore() {
	int ret = 0;
	int i, j;
	for( i = 0; i < n; i++ ) {
		int score = 1;
		for( j = 0; j < p; j++ ) {
			if ( i + j >= n )
				break;
			score *= c[i+j];
		}
		if ( j == p )
			ret = max(score, ret);
	}
	return ret;
}

void solve() {
	int i, j;
	for( i = 0; i < n; i++ )
		cin >> c[i];

	int Score = getscore();
	int ans = -1;
	for( i = 0; i < n; i++ ) {
		for( j = i+1; j < n; j++ ) {
			c[i] = c[i] + c[j];
			c[j] = c[i] - c[j];
			c[i] = c[i] - c[j];
			
			int score = getscore();
			ans = max(ans, score - Score);

			c[i] = c[i] + c[j];
			c[j] = c[i] - c[j];
			c[i] = c[i] - c[j];
		}
	}
	if ( ans == -1 )
		cout << "NO GAME" << endl;
	else 
		cout << ans << endl;
	}
}
int main() {
	while( cin >> n >> p ) {
		solve();
	}
	return 0;
}