#include <iostream> 
#include <algorithm> 
  
using namespace std; 
  
int c[100], temp[100]; 
  
int compute(int k,int n){ 
  int a,b; 
  b=0; 
  for(int i=0;i<n-k+1;i++){ 
    a=1; 
    for(int j=i;j<i+k;j++){ 
      a*=c[j]; 
    } 
    if(b<a)b=a; 
  } 
  return b; 
} 
int comb2(int n) { 
  int ret; 
  
  ret = n*(n-1)/2; 
    
  return ret; 
} 
  
void cpyswap(int i, int j, int n) { 
  for(int p = 0; p < n; i++) { 
    temp[p] = c[p]; 
  } 
  
  // swap 
  int x; 
    
  x = temp[i]; 
  temp[i] = temp[j]; 
  temp[j] = x; 
} 
  
void stSort(int array[], int num) { 
  int stemp[100]; 
  
  for(int i = 0; i < num; i++) { 
    stemp[i] = array[i] * 1000 + i; 
  } 
  
  sort(stemp, stemp + num); 
    
  for(int i = 0; i < num; i++) { 
    array[i] = stemp[i]/1000; 
  } 
} 
  
int main (void) { 
  int n, k, befDat[100], aftDat[45][100], res,change,mx,a,before; 
  
  while(1){ 
    cin >> n >> k; 
      
    if(n == 0 && k == 0) break; 
    mx=0; 
    for(int i = 0; i < n; i++) { 
      cin >> c[i]; 
    } 
    before=compute(k,n); 
    for(int i=0;i<n-1;i++){ 
      for(int j=i+1;j<n;j++){ 
    change=c[i]; 
    c[i]=c[j]; 
    c[j]=change; 
    a=compute(k,n); 
    if(mx<a)mx=a; 
    change=c[j]; 
    c[j]=c[i]; 
    c[i]=change; 
      } 
    } 
    if(mx-before>=0){ 
      cout<<mx-before<<endl; 
    }else{ 
      cout<<"NO GAME"<<endl; 
    } 
    /* aftDat 2mai irekae 
    for(int i = 0; i < comb2(n); i++) { 
      cpyswap(i, j, n); 
        
      for(int e = 0; e < n-k+1; e++) { 
    aftDat[i][e] *= temp[e]; 
    for(int f = 0; f < k; f++) { 
      aftDat[e] *= temp[e+f]; 
    } 
      } 
    }*/
    /* 
    stSort(befDat, n-k+1); 
    for(int i = 0; i < comb2(n); i++) 
      stSort(aftDat[i], n-k+1); 
  
    res = aftDat[n-k+1] - befDat[n-k+1]; 
  
    if(res <= 0) { 
      cout >> 0 >> endl; 
    } else { 
      cout >> res >> endl; 
      }*/
  } 
  return 0; 
} 