#include <iostream>
#include <algorithm>
using namespace std;
static const int N = 100;
int main(){
  int n,k,cnt,c[N],i,j,l,m,bcmax,acmax,x;
  while(1){
    cin >> n >> k;
    if(n==0&&k==0) break;
    for(i=0;i<n;i++){
      cin >> c[i];
    }
    bcmax=0;
    for(i=0;i<=n-k;i++){
      cnt=k;
      x=1;
      j=i;
      while(cnt){
	x*=c[j];
	j++;
	cnt--;
      }
      bcmax=max(bcmax,x);
    }
    acmax=0;
    for(i=0;i<n;i++){
      for(j=0;j<n;j++){
	if(i!=j){
	  swap(c[i],c[j]);
	  for(l=0;l<=n-k;l++){
	    cnt=k;
	    x=1;
	    m=l;
	    while(cnt){
	      x*=c[m];
	      m++;
	      cnt--;
	    }
	    acmax=max(acmax,x);
	  }
	  swap(c[i],c[j]);
	}
      }
    }
    if(acmax-bcmax>=0) cout << acmax-bcmax << endl;
    else cout << "NO GAME" << endl;
  }
  return 0;
}