#include<stdio.h>
#include<stdlib.h>
int main(){
	long n, m;
	long max;
	long sum;
	long i, j;
	long* list;
	
	while( 1 ){
		scanf( "%ld %ld", &n, &m );
		if(( n == 0) && ( m == 0 )){
			break;
		}
		list = ( int* )malloc( sizeof( long ) * n );
		for( i = 0; i < n; i++ ){
			scanf( "%ld",  (list + i ));
		}
		
		max = 0;
		for( i = 0; i < n; i++ ){
			for( j = i + 1; j < n; j++ ){
				sum = *( list + i ) + *( list + j );
				if( max < sum && m > sum )max = sum;
			}
		}
		
		if( max == 0 ){
			printf( "NONE\n" );
		}
		else{
			printf( "%ld\n", sum );
		}
		free( list );
	}
	return 0;
}


