#include <bits/stdc++.h>
using namespace std;
template <typename A, typename B>
inline void chmin(A &a, B b) {
  if (a > b) a = b;
}
template <typename A, typename B>
inline void chmax(A &a, B b) {
  if (a < b) a = b;
}
long long N, K;
long long A[100];
long long calc() {
  long long ma = 0;
  for (long long i = 0; i < (N - K + 1); i++) {
    long long t = 1;
    for (long long j = 0; j < (K); j++) t *= A[i + j];
    chmax(ma, t);
  }
  return ma;
}
signed main() {
  while (cin >> N >> K, N || K) {
    for (long long i = 0; i < (N); i++) cin >> A[i];
    long long p = calc();
    long long ma = 0;
    for (long long i = 0; i < (N); i++) {
      for (long long j = 0; j < (N); j++) {
        swap(A[i], A[j]);
        chmax(ma, calc());
        swap(A[i], A[j]);
      }
    }
    if (ma <= p)
      cout << "NO GAME" << endl;
    else
      cout << ma - p << endl;
  }
  return 0;
}
