#include <bits/stdc++.h>
int n, k, c[10];
int max_teacher, max_student, max_product;
void get_max_product() {
  int i, j, p, m_p;
  m_p = 0;
  for (i = 0; i <= n - k; i++) {
    p = 1;
    for (j = 0; j < k; j++) p *= c[i + j];
    if (p > m_p) m_p = p;
  }
  if (m_p > max_product) max_product = m_p;
}
int main() {
  int i, j, wk;
  while (EOF != scanf("%d %d", &n, &k) && (n || k)) {
    for (i = 0; i < n; i++) scanf("%d", &(c[i]));
    max_product = 0;
    get_max_product();
    max_teacher = max_product;
    max_product = 0;
    for (i = 0; i < n - 1; i++)
      for (j = i + 1; j < n; j++) {
        wk = c[i];
        c[i] = c[j];
        c[j] = wk;
        get_max_product();
        wk = c[i];
        c[i] = c[j];
        c[j] = wk;
      }
    max_student = max_product;
    if (max_student > max_teacher)
      printf("%d\n", max_student - max_teacher);
    else
      printf("NO GAME\n");
  }
  return (0);
}
