#include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>

using namespace std;

#define FOR(i,k,n) for(int i=(k); i<(int)n; ++i)
#define REP(i,n) FOR(i,0,n)
#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

template<class T> void debug(T begin, T end){ for(T i = begin; i != end; ++i) cout<<*i<<" "; cout<<endl; }

typedef long long ll;
const int INF = 100000000;
const double EPS = 1e-8;
const int MOD = 1000000007;

int calc(vector<int> v, int k){
  int n = v.size();
  int tmp = 1;
  REP(i,k)tmp *= v[i];
  int res = tmp;
  REP(i,n-k){
    tmp /= v[i];
    tmp *= v[i+k];
    res = max(res, tmp);
  }
  return res;
}
int main(){
  int n,k;
  while(cin>>n>>k,n||k){
    vector<int> v(n);
    REP(i,n)cin>>v[i];
    int S = calc(v, k);
    int ans = -INF;
    REP(i,n)REP(j,n){
      swap(v[i], v[j]);
      int S2 = calc(v,k);
      ans = max(ans, S2-S);
      swap(v[i], v[j]);
    }
    if(ans >= 0)cout<<ans<<endl;
    else cout<<"NOGAME"<<endl;
  }
  return 0;
}