#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<cstdio>
#include<sstream>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-8;
const int inf=1e9;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
int n,m;
vi in;
int ma(){
	int t=1;
	rep(i,m)t*=in[i];
	int a=t;
	rep(i,n-m){
		t=t/in[i]*in[i+m];
		a=max(a,t);
	}
	return a;
}
int main(){
	while(cin>>n>>m,n+m){
		in=vi(n);
		rep(i,n)cin>>in[i];
		int a=ma(),b=0;
		rep(i,n)rep(j,n)if(i!=j){
			swap(in[i],in[j]);
			b=max(b,ma());
			swap(in[i],in[j]);
		}
		if(a>b)cout<<"NO GAME"<<endl;
		else cout<<b-a<<endl;
	}
}