#include <bits/stdc++.h>
using namespace std;
struct Edge {
  int to, from, cost;
};
stringstream ss;
template <class T>
void chmin(T &t, T f) {
  if (t > f) t = f;
}
template <class T>
void chmax(T &t, T f) {
  if (t < f) t = f;
}
int in() {
  int x;
  scanf("%d", &x);
  return x;
}
const int INF = 2147483647 / 3;
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int dx[] = {1, -1, 0, 0, 1, -1, 1, -1, 0};
const int dy[] = {0, 0, 1, -1, 1, -1, -1, 1, 0};
int a[110];
int main() {
  int n, k;
  for (;;) {
    cin >> n >> k;
    if (n == 0 && k == 0) break;
    for (int i = 0; i < (n); ++i) cin >> a[i];
    int mx = 0;
    for (int i = 0; i < (n - k); ++i) {
      int m = 1;
      for (int j = 0; j < (k); ++j) {
        m *= a[i + j];
      }
      chmax(mx, m);
    }
    int mm = 0;
    for (int i = 0; i < (n - 1); ++i) {
      swap(a[i], a[i + 1]);
      for (int b = 0; b < (n - k); ++b) {
        int m = 1;
        for (int j = 0; j < (k); ++j) {
          m *= a[b + j];
        }
        chmax(mm, m);
      }
      swap(a[i], a[i + 1]);
    }
    if (mm < mx) {
      cout << "NO GAME" << endl;
    } else {
      cout << mm - mx << endl;
    }
  }
  return 0;
}
