#include <bits/stdc++.h>
const int inf = 100000000;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
using namespace std;
int n;
int k;
int c[102];
void solve() {
  int maxi1, maxi2;
  int start;
  maxi1 = 0;
  maxi2 = 0;
  for (int i = 0; i < (n); i++) cin >> c[i];
  for (int i = 0; i < (n + 1 - k); i++) {
    int tmp = 1;
    for (int j = 0; j < (k); j++) {
      tmp *= c[i + j];
    }
    if (maxi1 < tmp) {
      start = i;
      maxi1 = max(maxi1, tmp);
    }
  }
  int idx = start;
  for (int i = start; i < start + k; i++) {
    if (c[idx] > c[i]) idx = i;
  }
  maxi2 = maxi1 / c[idx];
  int tmp = 0;
  for (int i = 0; i < (n); i++)
    if (i == idx || !(start <= i && i < start + k)) tmp = max(tmp, c[i]);
  maxi2 *= tmp;
  if (maxi2 - maxi1 < 0)
    cout << "no game" << endl;
  else
    cout << maxi2 - maxi1 << endl;
}
int main() {
  while (cin >> n >> k) {
    if (k + n == 0) break;
    solve();
  }
  return 0;
}
