#include <bits/stdc++.h>
using namespace std;
int calc(int*, int, int);
int main() {
  while (true) {
    int n, k;
    cin >> n >> k;
    if (n == 0) return 0;
    int c[100];
    for (int i = 0; i < n; i++) cin >> c[i];
    int nowc = calc(c, k, n);
    int cmax;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (i == j) continue;
        swap(c[i], c[j]);
        int cprime = calc(c, k, n);
        cmax = max(cprime, cmax);
        swap(c[i], c[j]);
      }
    }
    if (cmax < nowc)
      cout << "NO GAME";
    else
      cout << cmax - nowc;
  }
  return 0;
}
int calc(int* c, int k, int n) {
  int m = 0;
  for (int i = 0; i < n - k; i++) {
    int v = 1;
    for (int j = 0; j < k; j++) {
      v *= c[i + j];
    }
    m = max(v, m);
  }
  return m;
}
