#include <iostream>
#include <algorithm>
using namespace std;

int main() {

  int n,k;
  while(1) {
    cin >> n >> k;
    if(n == 0 && k == 0) break;

    int a[101] ={};
 
    for(int i=0;i<n;i++) cin >> a[i];

     int ck = -1;
    for(int i=0;i<=n-k;i++) {
      int t = 1;
      for(int j=0;j<k;j++) t*= a[j+i];
      if(ck <t) ck = t;
    }

    int ck2=-1;
    for(int i=0;i<n;i++) {
      for(int j=0;j<n;j++) {
	if(i == j) continue;
	swap(a[i] ,a[j]);
	for(int l=0;l<=n-k;l++) {
	  int t = 1;
	  for(int m=0;m<k;m++) t*= a[m+l];
	  if(ck2 <t) ck2 = t;
	}
	swap(a[i],a[j]);
      }
    }

    // cout << ck <<" "<<ck2<<endl;
    if(ck2-ck < 0 ) cout <<"NO GAME"<<endl;
    else cout << ck2-ck <<endl;
  }
  return 0;  
}