#include <stdio.h>
int main(int argc, char const *argv[]){
	int n,m,a[1000],i,max=0,tmp,j;
	scanf("%d %d",&n,&m);
	if(n<2||m<2)
		return 0;
	for(i=0;i<n;i++)
		scanf("%d",&a[i]);
	for(i=0;i<n;i++)
		for(j=i+1;j<n;j++){
			tmp=a[i]+a[j];
			if(tmp<=m&&tmp>max)
				max=tmp;
		}
	if(max==0)printf("NONE\n");
	else printf("%d\n",max);
	return 0;
}
