#include<cmath>
#include<cctype>
#include<cstdlib>
#include<cstdio>
#include<climits>
#include<iostream>
#include<algorithm>
#include<vector>
#include<deque>
#include<string>
#include<queue>
#include<map>
#include<set>
#include<utility>
#include<queue>

using namespace std;
int n,k;
int max_p( vector<int> const & v){

  int product = 1;
  for(int i = 0;i < k;i++){
    product *= v[i];
  }
  int max_product = product;
  for(int i = k,tail = 0;i < n;i++,tail++){
    product /= v[tail];
    product *= v[i];
    max_product = max(max_product,product);
  }
  return max_product;
}

int main(){
  ios::sync_with_stdio(false);
  while(cin >> n >> k && n + k > 0){
    vector<int> input;    
    for(int i = 0;i < n; ++i){
      int x;
      cin >> x;
      input.push_back(x);
    }
    int sensei = max_p(input);
    int maxi = 0;
    for(int i = 0;i < n;i++){
      for(int j = i+1;j < n;j++){
	swap(input[i],input[j]);
	maxi = max(maxi,max_p(input));
	swap(input[i],input[j]);
      }
    }
    if(maxi - sensei >= 0)cout << maxi - sensei << endl;
    else cout << "NO GAME" << endl;
  }
  return 0;
}