#include <stdio.h>

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

	while(1){
		scanf("%d %d", &n, &m);
		if(n == 0 && m == 0) break;
		for(int i=0; i<n; i++){
			scanf("%d", &a[i]);
		}

		max = -1;
		for(int i=0; i<n-1; i++){
			for(int j=i+1; j<n; j++){
				if(max < a[i]+a[j] && a[i]+a[j] <= m){
					max = a[i]+a[j];
				}
			}
		}
		if(max == -1) printf("NONE\n");
		else printf("%d\n", max);
	}//endwhile

}
