#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <assert.h>
#include <vector>
#include <queue>
#include <string>
#include <map>
#include <set>

using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const double EPS = 1e-9;
static const double PI = acos(-1.0);

#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, s, n) for (int i = (s); i < (int)(n); i++)
#define FOREQ(i, s, n) for (int i = (s); i <= (int)(n); i++)
#define FORIT(it, c) for (__typeof((c).begin())it = (c).begin(); it != (c).end(); it++)
#define MEMSET(v, h) memset((v), h, sizeof(v))

int n, k;
ll calc(const vector<ll> seq) {
  ll ret = 0;
  REP(s, n) {
    if (s + k > n) { continue; }
    ll mul = 1;
    REP(j, k) {
      mul *= seq[s + j];
    }
    ret = max(ret, mul);
  }
  return ret;
}

int main() {
  while (scanf("%d %d", &n, &k), n|k) {
    vector<ll> seq(n);
    REP(i, n) {
      scanf("%lld", &seq[i]);
    }
    ll start = calc(seq);
    ll best = 0;
    REP(i, n) {
      REP(j, i) {
        vector<ll> nseq = seq;
        swap(nseq[i], nseq[j]);
        best = max(best, calc(nseq));
      }
    }
    if (start <= best) {      printf("%lld\n", best - start);
    } else {
      puts("NO GAME");
    }
  }
}