#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>

using namespace std;

void solve()
{
	int n, k;
	while (cin >> n >> k, n || k)
	{
		vector<int> card(n);
		for (int i = 0; i < n; ++i)
		{
			cin >> card[i];
		}
		int Ck = 0;
		int a = 1;
		for (int i = 0; i < k; ++i)
		{
			a *= card[i];
		}
		Ck = max(Ck, a);
		for (int i = k; i < n; ++i)
		{
			a /= card[i - k];
			a *= card[i];
			Ck = max(Ck, a);
		}
		int maxCk = 0;
		for (int i = 0; i < n - 1; ++i)
		{
			for (int j = i + 1; j < n; ++j)
			{
				if (card[i] == card[j])
				{
					continue;
				}
				int temp = card[i];
				card[i] = card[j];
				card[j] = temp;
				int CkNow = 0;
				int b = 1;
				for (int l = 0; l < k; ++l)
				{
					b *= card[l];
				}
				maxCk = max(maxCk, b);
				for (int l = k; l < n; ++l)
				{
					b /= card[l - k];
					b *= card[l];
					maxCk = max(maxCk, b);
				}
				card[j] = card[i];
				card[i] = temp;
			}
		}
		if (maxCk < Ck)
		{
			cout << "NO GAME" << endl;
		}
		else
		{
			cout << maxCk - Ck << endl;
		}
	}
}

int main()
{
	solve();
	return(0);
}