#include <bits/stdc++.h>
using namespace std;
const int MAX = 100;
int data[100];
int n, k;
long long getmax() {
  long long now = 1;
  for (int i = 0; i < k; i++) now *= data[i];
  long long out = now;
  for (int i = k; i < n; i++) {
    now /= data[i - k];
    now *= data[i];
    out = max(now, out);
  }
  return out;
}
int main() {
  cin >> n >> k;
  long long c[2] = {0, 0};
  for (int i = 0; i < n; i++) cin >> data[i];
  c[0] = getmax();
  for (int i = 0; i < n - 1; i++) {
    for (int j = i; j < n; j++) {
      swap(data[i], data[j]);
      c[1] = max(c[1], getmax());
      swap(data[i], data[j]);
    }
  }
  if (c[1] - c[0] < 0)
    cout << "NO GAME" << endl;
  else
    cout << c[1] - c[0] << endl;
  return 0;
}
