#include <bits/stdc++.h>
using namespace std;
const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, -1, 0, 1};
const double EPS = 1e-9;
int main() {
  while (true) {
    int n, k;
    cin >> n >> k;
    if (n == 0) break;
    vector<int> C(n);
    for (int i = 0; i < n; i++) {
      cin >> C[i];
    }
    int sensei = -1;
    {
      int now = 1;
      for (int l = 0; l < k; l++) {
        now *= C[l];
      }
      sensei = max(sensei, now);
      for (int l = k; l < n; l++) {
        now /= C[l - k];
        now *= C[l];
        sensei = max(sensei, now);
      }
    }
    int maxi = -1;
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j < n; j++) {
        swap(C[i], C[j]);
        int now = 1;
        for (int l = 0; l < k; l++) {
          now *= C[l];
        }
        maxi = max(maxi, now);
        for (int l = k; l < n; l++) {
          now /= C[l - k];
          now *= C[l];
          maxi = max(maxi, now);
        }
        swap(C[i], C[j]);
      }
    }
    if (maxi < sensei) {
      cout << "NO GAME" << endl;
    } else {
      cout << sensei - maxi << endl;
    }
  }
  return 0;
}
