#include <iostream>

using namespace std;


int Max(int n,int K,int c[]){
  int k,l,CK,M=0;
 for(k=0;k<n-K+1;k++){
	CK=1;
	for(l=k;l<k+K;l++){
	  CK*=c[l];
	}
	if(CK>M)M=CK;
      }
 return M;
}

int main(){
  int n,K,M1,M2,tmp,cnt=0;
  int i,j;
  int c[100];
  while(cnt<100){
    cnt++;
  cin >> n >> K;
  if(n==0&&K==0)break;
  for(i=0;i<n;i++)cin>>c[i];
  M1=0;
  M2=0;
  if(M1<Max(n,K,c)) M1=Max(n,K,c);
  for(i=0;i<n-1;i++){
    for(j=i+1;j<n;j++){
      tmp=c[i];
      c[i]=c[j];
      c[j]=tmp;
  if(M2<Max(n,K,c))M2=Max(n,K,c);
      tmp=c[i];
      c[i]=c[j];
      c[j]=tmp;
    }
  } 
  if(M1<=M2)cout<<M2-M1<<endl;
  else cout << "NO GAME"<<endl;
  }
  return 0;
}