#include<iostream>
using namespace std;
int main(){
  int n,k;
  while(cin >>n>>k,n||k){
    int log[100]={0},nlog[100]={0},c,ans=0;
    for(int i=0; i<n; i++){cin >>log[i];}
    int x = 1;
    for(int i=0; i<k; i++){x*=log[i];}
    c = x;
    for(int i=k; i<n; i++){
      x = x*log[i]/log[i-k];
      if(c<x){c = x;}
    }
    for(int i=0; i<n; i++){
      for(int j=i+1; j<n; j++){
	for(int r=0; r<n; r++){
	  if(r == i){nlog[r] = log[j];}
	  else if(r == j){nlog[r] = log[i];}
	  else{nlog[r] = log[r];}
	}
	int f = 1;
	for(int r=0; r<k; r++){f*=nlog[r];}
	if(ans<f){ans = f;}
	for(int r=k; r<n; r++){
	  f = f*nlog[r]/nlog[r-k];
	  if(ans<f){ans = f;}
	}
      }
    }
    if(c<=ans){cout <<ans-c<<endl;}
    else{cout <<"NO GAME"<<endl;}
  }
  return 0;
}