#include<iostream>
using namespace std;

#define MAX 100
#define INF 10000007

#define max(a,b) (a>b?a:b)
#define min(a,b) (a>b?b:a)

int main() {
  int n, k, c[MAX], pr, c1, c2, mi, ma;
  while(cin >> n >> k && n && k) {
    for(int i=0; i<n; ++i) cin >> c[i];
    pr = 1; c1 = 0; c2 = 0;
    for(int i=0; i<k-1; ++i) pr *= c[i];
    for(int i=0; i<n-k+1; ++i) {
      pr *= c[i+k-1];
      c1 = max(c1, pr);
      mi = INF; ma = 0;
      for(int j=0; j<n; ++j) {
        if(i<=j && j<i+k) mi = min(mi, c[j]);
        else ma = max(ma, c[j]);
      }
      c2 = max(c2, pr*ma/mi);
      pr /= c[i];
    }
    if(c2<c1) {
      cout << (k>1 ? "0" : "NO GAME") << endl;
    }else cout << c2 - c1 << endl;
  }
  return 0;
}