#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int check(vector<int>& vec,int k)
{
  int res = 0,cal = 1;
  for(int i=0;i<vec.size();i++)
    {
      if(i < k)
	{
	  cal *= vec[i],res = max(cal,res);
	  continue;
	}
      cal /= vec[i-k];
      cal *= vec[i];
      res = max(cal,res);
    }
  return res;
}

int main()
{
  int n,k;
  while(cin >> n >> k,n|k)
    {
      vector<int> vec;
      vec.resize(n);
      for(int i=0;i<n;i++)
	cin >> vec[i];
      int ans = 0,C;
      C = check(vec,k);
      for(int i=0;i<n;i++)
	for(int j=i+1;j<n;j++)
	  swap(vec[i],vec[j]),ans = max(ans,check(vec,k)),swap(vec[i],vec[j]);
      ans-C>=0?cout << ans-C << endl:cout << "NO GAME" << endl;
    }
  return 0;
}