#include <bits/stdc++.h>
const int INF = 100000000;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
using namespace std;
int n;
int k;
int c[102];
void solve() {
  int maxi1, maxi2;
  maxi1 = 0;
  maxi2 = 0;
  for (int i = 0; i < (n); i++) cin >> c[i];
  for (int i = 0; i < (n - 1); i++) maxi1 = max(maxi1, c[i] * c[i + 1]);
  for (int i = 0; i < (n); i++)
    for (int j = 0; j < (n); j++)
      if (i != j) maxi2 = max(maxi2, c[i] * c[j]);
  if (maxi2 - maxi1 < 0)
    cout << "NO GAME" << endl;
  else
    cout << maxi2 - maxi1 << endl;
}
int main() {
  while (cin >> n >> k) {
    if (k + n == 0) break;
    solve();
  }
  return 0;
}
