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