#include <bits/stdc++.h>
using namespace std;
int main() {
  long long card[1010];
  int n, k;
  while (cin >> n >> k) {
    if (n == 0 && k == 0) break;
    for (int i = 0; i < n; i++) {
      cin >> card[i];
    }
    long long res[1010];
    fill(res, res + 1010, 1);
    for (int i = 0; i <= n - k; i++) {
      for (int j = i; j < i + k; j++) {
        res[i] *= card[j];
      }
    }
    long long nmax = 0;
    for (int i = 0; i <= n - k; i++) {
      nmax = max(nmax, res[i]);
    }
    sort(card, card + n, greater<int>());
    long long t = 1;
    for (int i = 0; i < k; i++) t *= card[i];
    if (t >= nmax)
      cout << t - nmax << endl;
    else
      cout << "NO GAME" << endl;
  }
  return 0;
}
