#include <bits/stdc++.h>
using namespace std;
int c[101], n, k;
int func(int p, int q) {
  int mx = 1, t;
  for (int i = 0; i < k; ++i) mx *= c[i];
  t = mx;
  for (int i = p + k; i <= q; ++i) {
    t /= c[i - k];
    t *= c[i];
    mx = max(t, mx);
  }
  return mx;
}
int func() {
  int mx = 1, t;
  for (int i = 0; i < n - k; ++i) {
    t = 1;
    for (int j = 0; j < k; ++j) t *= c[i + j];
    mx = max(t, mx);
  }
  return mx;
}
int main() {
  int cmx, s, t, p, q;
  while (cin >> n >> k && n + k) {
    cmx = 1;
    for (int i = 0; i < n; ++i) cin >> c[i];
    t = 1;
    cmx = func(0, n - 1);
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < n; ++j) {
        if (i == j) continue;
        swap(c[i], c[j]);
        t = max(t, func());
        swap(c[i], c[j]);
      }
    }
    if (t < cmx)
      cout << "NO GAME" << endl;
    else
      cout << (t - cmx) << endl;
  }
  return 0;
}
