#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, n, k, data[101];
  cin >> n;
  cin >> k;
  for (i = 0; i < n; i++) {
    cin >> data[i];
  }
  int max = -1;
  for (i = 0; i <= n - k; i++) {
    int total = 1;
    for (j = i; j < i + k; j++) {
      total *= data[j];
    }
    if (max < total) max = total;
  }
  sort(data, data + n);
  reverse(data, data + n);
  int result = 1;
  for (i = 0; i < k; i++) {
    result *= data[i];
  }
  int ans = result - max;
  if (ans < 0)
    cout << "NO GAME" << endl;
  else
    cout << ans << endl;
  return 0;
}
