#include <iostream>
#include <algorithm>
using namespace std;
 
#define debug(x) cerr<<#x<<" = "<<x<<endl;
 
const int C_MAX = 100;
 
int cards[C_MAX];
 
// [i, i+k)
int point[C_MAX];
 
int main() {
    for(int N, K; cin >> N >> K, N || K;) {
        for(int i = 0; i < N; i++) {
            cin >> cards[i];
        }
 
        point[0] = 1;
        for(int i = 0; i < K; i++) {
            point[0] *= cards[i];
        }
 
        for(int i = 1; i < N - K + 1; i++) {
            point[i] = point[i - 1] / cards[i - 1] * cards[i + K - 1];
        }
 
        int before = *max_element(point, point + N - K + 1);
        int vmax = -1;
 
        for(int x = 0; x < N; x++) {
            for(int y = 0; y < N; y++) {
                if(x == y) continue;
                swap(cards[x], cards[y]);
 
                point[0] = 1;
                for(int i = 0; i < K; i++) {
                    point[0] *= cards[i];
                }
 
                for(int i = 1; i < N - K + 1; i++) {
                    point[i] = point[i - 1] / cards[i - 1] * cards[i + K - 1];
                }
 
                int after = *max_element(point, point + N - K + 1);
                vmax = max(vmax, after);
 
                swap(cards[x], cards[y]);
            }
        }
        if(vmax < before)
            cout << "NO GAME" << endl;
        else {
            cout << vmax - before << endl;
        }
    }
 
    return 0;
}