#include <bits/stdc++.h>
using namespace std;
int main() {
  while (true) {
    int n, k, d = 0, e = 0, bmax = 0, amax = 0;
    cin >> n >> k;
    if (n == 0 && k == 0) {
      break;
    }
    int c[n];
    for (int i = 0; i < n; i++) {
      cin >> c[i];
    }
    for (int i = 0; i < n - k + 1; i++) {
      for (int m = 0; m < k; m++) {
        e = c[m + i] * e;
      }
      if (e > bmax) {
        bmax = e;
      }
    }
    for (int i = 0; i < n - 1; i++) {
      for (int j = 0; j < n; j++) {
        int w = c[i];
        c[i] = c[j];
        c[j] = w;
        for (int i = 0; i < n - 1; i++) {
          for (int m = 0; m < k; m++) {
            d = c[m + i] * d;
            if (d > amax) {
              amax = d;
            }
          }
        }
      }
    }
    if (amax >= bmax) {
      cout << amax - bmax << endl;
    } else if (amax < bmax) {
      cout << "NO GAME" << endl;
    }
  }
  return 0;
}
