#include <cstdio>
#include <iostream>
#include <vector>
#include <list>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <iterator>
#include <cstdlib>
#include <cstring>
#include <sstream>

using namespace std;

const double EPS=(1e-10);
typedef long long ll;
typedef pair<int,int> pii;
bool EQ(double a,double b){
  return abs((a)-(b))<EPS;
}
void fast_stream(){
	std::ios_base::sync_with_stdio(0);
}

int n;
int a[1001];
int k;
void solve(){
    while(cin>>n>>k&&(n|k)){
        for(int i=0;i<n;i++)cin>>a[i];
        int maxt=0;
        for(int i=0;i+k<=n;i++){
            int tmp=1;
            for(int j=0;j<k;j++)tmp*=a[i+j];
            maxt=max(maxt,tmp);
        }
        int maxs=0;
        for(int i=0;i<n;i++){
            for(int j=i+1;j<n;j++){
                swap(a[i],a[j]);
                for(int l=0;l+k<=n;l++){
                    int tmp=1;
                    for(int m=0;m<k;m++)tmp*=a[l+m];
                    maxs=max(maxs,tmp);
                }
                swap(a[i],a[j]);
            }
        }
        if(maxt>maxs)cout<<"NO GAME"<<endl;
        else cout<<maxs-maxt<<endl;
    }
}
int main(){

    solve();

    return 0;
}