#include<stdio.h>

int main(void){
	int n,k,c,cc,flag=0,cnt=1;
	int card[10];
	int i,j;

	scanf("%d %d",&n,&k);
	for(i=0;i<n;i++)
		scanf("%d",&card[i]);

	while((n != 0 && k != 0) && cnt <= 100){	

		cc=card[n-1]*card[n-2];
		c = cc;

		for(i=0;i<n;i++){
			for(j=0;j<i;j++){
				if(card[i]*card[j] >= c){
					c = card[i]*card[j];
					flag = 1;
				}
			}
		}

		if(flag == 1)
			printf("%d\n",c-cc);
		else
			printf("NO GAME\n");
	
		scanf("%d %d",&n,&k);
		for(i=0;i<n;i++)
			scanf("%d",&card[i]);
		cnt++;
	}

	return 0;
}