#include <bits/stdc++.h>
using namespace std;
int calc_max(int c[], int n, int k) {
  int sc = 1;
  int max = -1;
  for (int i = 0; i < n; i++) {
    sc *= c[i];
    if (i >= k - 1) {
      if (sc > max) {
        max = sc;
      }
      sc /= c[i - k + 1];
    }
  }
  return max;
}
int main() {
  int n, k;
  int card[100];
  int chcard[100];
  int befmax, afmax;
  while (1) {
    cin >> n >> k;
    if (n == 0 && k == 0) break;
    for (int i = 0; i < n; i++) {
      cin >> card[i];
    }
    befmax = calc_max(card, n, k);
    afmax = -1;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (i == j) break;
        for (int k = 0; k < n; k++) {
          if (k == i)
            chcard[k] = card[j];
          else if (k == j)
            chcard[k] = card[i];
          else
            chcard[k] = card[k];
        }
        int tmp = befmax = calc_max(chcard, n, k);
        if (tmp > afmax) afmax = tmp;
      }
    }
    if (afmax < befmax)
      cout << "NO GAME" << endl;
    else
      cout << afmax - befmax << endl;
  }
  return 0;
}
