#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, i, l;
  vector<int> c;
  int maxc, maxc2, seki;
  while (1) {
    cin >> n >> k;
    if (n == 0 && k == 0) break;
    maxc = 0;
    for (i = 0; i < n; i++) {
      cin >> m;
      c.push_back(m);
    }
    for (i = 0; i <= n - k; i++) {
      seki = 1;
      for (l = 0; l < k; l++) seki *= c[i + l];
      if (seki > maxc) maxc = seki;
    }
    sort(c.rbegin(), c.rend());
    maxc2 = 1;
    for (i = 0; i < k; i++) maxc2 *= c[i];
    if (maxc2 > maxc)
      printf("%d\n", maxc2 - maxc);
    else
      printf("NO GAME\n");
  }
  return 0;
}
