#include <bits/stdc++.h>
using namespace std;
int main() {
  priority_queue<int> PQ;
  int i, j, n, k, data[101];
  while (1) {
    while (!PQ.empty()) {
      PQ.pop();
    }
    cin >> n;
    cin >> k;
    if (n == 0 && k == 0) break;
    for (i = 0; i < n; i++) {
      cin >> data[i];
    }
    int max = -1;
    int tmp;
    for (i = 0; i <= n - k; i++) {
      int total = 1;
      for (j = i; j < i + k; j++) {
        total *= data[j];
      }
      if (max < total) {
        tmp = j - k;
        max = total;
      }
    }
    for (i = tmp; i < tmp + k; i++) PQ.push(data[i]);
    for (i = 0; i < n; i++) {
      if (i >= tmp && tmp + k > i) continue;
      PQ.push(data[i]);
    }
    int result = 1;
    for (i = 0; i < k; i++) {
      result *= PQ.top();
      PQ.pop();
    }
    int ans = result - max;
    if (ans < 0)
      cout << "NO GAME" << endl;
    else
      cout << ans << endl;
  }
  return 0;
}
