#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  while (scanf("%d%d", &n, &k) && n + k) {
    int c[128];
    for (int(i) = (0); ((i)) < ((n)); ++(i)) scanf("%d", c + i);
    int t = 0;
    int ck = 1;
    for (int(i) = (0); ((i)) < ((k)); ++(i)) ck *= c[i];
    t = max(t, ck);
    for (int(i) = (0); ((i)) < ((n - k + 1)); ++(i)) {
      ck /= c[i];
      ck *= c[i + k];
      t = max(t, ck);
    }
    int res = 0;
    for (int(i) = (0); ((i)) < ((n)); ++(i))
      for (int(j) = (0); ((j)) < ((n)); ++(j)) {
        swap(c[i], c[j]);
        int ck = 1;
        for (int(l) = (0); ((l)) < ((k)); ++(l)) ck *= c[l];
        res = max(res, ck);
        for (int(l) = (0); ((l)) < ((n - k + 1)); ++(l)) {
          ck /= c[l];
          ck *= c[l + k];
          res = max(res, ck);
        }
        swap(c[i], c[j]);
      }
    if (res < t)
      puts("NO GAME");
    else
      printf("%d\n", res - t);
  }
  return 0;
}
