#include <iostream>
#include <iomanip>
#include <sstream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <cassert>
#include <climits>
#include <queue>
#include <set>
#include <map>
#include <valarray>
#include <bitset>
#include <stack>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
typedef long long ll;
typedef pair<int,int> pii;
const int INF = 1<<29;
const double PI = acos(-1);
const double EPS = 1e-8;

int main() {
  int n, k;
  while(cin >> n >> k, n||k) {
    int a[n];
    REP(i, n) cin >> a[i];
    int Ck = 1;
    REP(ii, n-k+1) {
      int tmp = 1;
      REP(jj, k) {
        tmp *= a[ii+jj];
      }
      Ck = max(tmp, Ck);
    }

    int ma = -1;
    REP(i, n) {
      REP(j, i) {
        swap(a[i], a[j]);
        int t = 1;
        REP(ii, n-k+1) {
          int tmp = 1;
          REP(jj, k) {
            tmp *= a[ii+jj];
          }
          t = max(tmp, t);
        }
        if (t >= Ck) {
          ma = max(ma, t-Ck);
        }
        swap(a[i], a[j]);
      }
    }
    if (ma == -1) {
      cout << "NO GAME" << endl;
    } else {
      cout << ma << endl;
    }
  }
}