#include <bits/stdc++.h>
using namespace std;
int pt(int *c, int n, int k) {
  int p = 0;
  for (int i = 0; i < n - k + 1; i++) {
    int cp = 1;
    for (int j = 0; j < k; j++) {
      cp *= c[i + j];
    }
    p = max(p, cp);
  }
}
int main() {
  for (int n, k; cin >> n >> k, n | k;) {
    int c[100];
    for (int i = 0; i < n; i++) {
      cin >> c[i];
    }
    int b = pt(c, n, k);
    int cp = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j < n; j++) {
        swap(c[i], c[j]);
        cp = max(cp, pt(c, n, k));
        swap(c[i], c[j]);
      }
    }
    if (cp < b) {
      cout << "NO GAME" << endl;
    } else {
      cout << cp - b << endl;
    }
  }
  return 0;
}
