#include <iostream>
#include <algorithm>

using namespace std;

int data[100], n, k;

int main(){
  while(cin >> n >> k && (n|k)){
    for(int i=0;i<n;i++){
      cin >> data[i];
    }
    int ck = 0;
    for(int i=0;i+k<=n;i++){
      int tmp = 1;
      for(int j=0;j<k;j++){
        tmp *= data[i+j];
      }
      ck = max(ck, tmp);
    }
    int ans = 0;
    for(int i=0;i<n;i++){
      for(int j=0;j<n;j++){
        int tmp = data[i];
        data[i] = data[j];
        data[j] = tmp;
        for(int i2=0;i2+k<=n;i2++){
          int t = 1;
          for(int j2=0;j2<k;j2++){
            t *= data[i2+j2];
          }
          ans = max(ans, t);
        }
        data[j] = data[i];
        data[i] = tmp;
      }
    }
    if(ans < ck) cout << "NO GAME" << endl;
    else cout << ans-ck << endl;
  }
}