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

int main(){
  while(1){
    int data[101],i,j,k,result;
    int N,K; cin >> N >> K;
    if( N == 0 && K == 0 ) break;

    for( i = 0; i < N; i++ ) cin >> data[i];
  
    int maxv = -1;
    for( i = 0; i <= N-K; i++ ) {
      result = 1;
      for( j = i; j < i+K; j++ ) result *= data[j];
      maxv = max( result,maxv);
    }
    
    int maxv2 = -1;
    int result2;
    for( i = 0; i < N; i++ ){
      for( j = i+1; j < N; j++ ){
	swap( data[i],data[j] );
	for( k = 0; k <= N-K; k++ ) {
	  result2 = 1;
	  for( int l = k; l < k+K; l++ ) result2 *= data[l];
	  maxv2 = max( result2,maxv2 );
	}
	swap( data[i],data[j] );
      }
    }

    int ans = maxv2 - maxv;

    if( ans >= 0 ) cout << ans << endl;
    else cout << "NO GAME" << endl;
  }
  return 0;
}