#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  while (cin >> n >> k, n + k) {
    vector<int> c;
    for (int i = 0; i < n; i++) {
      int m;
      cin >> m;
      c.push_back(m);
    }
    int ck = 0;
    for (int i = 0; i <= c.size() - k; i++) {
      int sum = 1;
      for (int j = 0; j < k; j++) {
        sum *= c[i + j];
      }
      if (ck < sum) ck = sum;
    }
    sort(c.begin(), c.end(), greater<int>());
    int sum = 1;
    for (int i = 0; i < k; i++) {
      sum *= c[i];
    }
    if (ck < sum)
      cout << sum - ck << endl;
    else
      cout << "NO GAME" << endl;
  }
}
