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

int n, k;

int calc(vector<int> card){
  int ret = -1;
  for(int i = 0 ; i < n-k+1 ; i++){
    int t = 1;
    for(int j = i ; j < i+k ; j++){
      t *= card[j];
    }
    ret = max(ret, t);
  }
  return ret;
}

int main(){
  while(cin >> n >> k){
    if(n == 0 && k == 0) break;
    vector<int> card;
    int t;
    for(int i = 0 ; i < n ; i++){
      cin >> t;
      card.push_back(t);
    }
    
    int prev = -1, Max = -1;
    prev = calc(card);
    bool f = false;
    
    
    for(int i = 0 ; i < n ; i++){
      for(int j = i+1 ; j < n ; j++){
	swap(card[i], card[j]);
	t = calc(card);
	if(Max < t){
	  Max = t;
	  f = true;
	}
	swap(card[i], card[j]);
      }
    }
    //cout << prev << endl << Max << endl;
    
    if(!f) cout << "NO GAME" << endl;
    else cout << Max-prev << endl;
  }
  return 0;
}