#include <bits/stdc++.h>
using namespace std;
int n, k;
vector<int> c;
void init() { c.clear(); }
bool input() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    int tmp;
    cin >> tmp;
    c.push_back(tmp);
  }
  return true;
}
int cul(vector<int> c) {
  int res = 0;
  int tmp = 1;
  for (int i = 0; i < c.size(); i++) {
    if (i < k) {
      tmp *= c[i];
    } else {
      tmp /= c[i - k];
      tmp *= c[i];
    }
    res = max(res, tmp);
  }
  return res;
}
int solve() {
  int cc = cul(c);
  vector<int> in = c;
  int ccc = 0;
  for (int i = 0; i < c.size(); i++) {
    for (int j = 0; j < c.size(); j++) {
      if (i == j) continue;
      swap(c[i], c[j]);
      ccc = max(ccc, cul(c));
      c = in;
    }
  }
  return ccc - cc;
}
int main() {
  init();
  input();
  int ans = solve();
  if (ans < 0) {
    cout << "NO GAME" << endl;
  } else {
    cout << ans << endl;
  }
}
