#include <iostream>
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 max = -1;
    for( i = 0; i <= N-K; i++ ) {
      result = 1;
      for( j = i; j < i+K; j++ ){
	result *= data[j];
	if( max < result ) max = result;
      }
    }
    
    int max2 = -1;
    int result2;
    for( i = 0; i < N; i++ ){
      for( j = 0; j < N; j++ ){
	if( i != 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];
	      if( max2 < result2 ) max2 = result2;
	    }
	  }
	  swap( data[i],data[j] );
	}
      }
    }

    int ans = max2 - max;

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