#include <stdio.h>

int main(){
	
	int n,m,a[1001];

	int i,i2;
	int price,max=0;

	for(;;){
		scanf("%d %d",&n,&m);
		if(n==0 && m==0)break;

		max=0;

		for(i=1;i<=n;i++){
			scanf("%d",&a[i]);
		}

		for(i=1;i<=n;i++){
			for(i2=i+1;i2<=n;i2++){
				if(i==i2)continue;
				price=a[i]+a[i2];
				if(price>max && price<=m)max=price;
			}

		}


		if(max==0){
			printf("NONE\n");
			continue;
		}
		printf("%d\n",max);
	}





	return 0;
}
