#include<iostream>

using namespace std;

typedef long long ll;

const int MAX = 100;
int data[100];
int n,k;

ll getmax(){
  ll now = 1;
  for(int i = 0; i < k; i++) now *= data[i];
  ll out = now;
  for(int i = k; i < n; i++){
    now /= data[i-k];
    now *= data[i];
    out = max(now,out);
  }
  return out;
}

int main(){
  while(cin >> n >> k && n+k){
    ll c[2] = {0,0};
    for(int i = 0; i < n; i++) cin >> data[i];
    c[0] = getmax();
    
    for(int i = 0; i < n-1; i++){
      for(int j = i+1; j < n; j++){
	swap(data[i],data[j]);
	c[1] = max(c[1],getmax());
	swap(data[i],data[j]);
      }
    }
    if(c[1] - c[0] < 0) cout << "NO GAME" << endl;
    else cout << c[1] - c[0] << endl;
  }
  return 0;
}