#include <bits/stdc++.h>
using namespace std;
void swap(vector<int> vs, int i, int j) {
  int val = vs[i];
  vs[i] = vs[j];
  vs[j] = val;
}
int calc(vector<int> vs, int k) {
  long long int prod = 1;
  for (int i = 0; i < k; i++) {
    prod *= vs[i];
  }
  long long int ans = prod;
  for (int i = k; i < vs.size(); i++) {
    prod /= vs[i - k];
    prod *= vs[i];
    ans = max(prod, ans);
  }
  return ans;
}
int main() {
  while (true) {
    int n, k;
    cin >> n >> k;
    if (n == 0 and k == 0) break;
    vector<int> vs(n);
    for (int i = 0; i < n; i++) {
      cin >> vs[i];
    }
    int init_score = calc(vs, k);
    int max_score = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j < n; j++) {
        swap(vs, i, j);
        int score = calc(vs, k);
        max_score = max(max_score, score);
        swap(vs, i, j);
      }
    }
    if (max_score < init_score) {
      cout << "NO GAME" << endl;
    } else {
      cout << max_score - init_score << endl;
    }
  }
}
