#include <iostream>
using namespace std;

int main(){
	int n,m,max,tmp,a[1000];
	while(1){
		cin >> n >> m;
		if(n==0&&m==0)break;
		max = 0;

		for(int i=0;i<n;i++){
			cin >> tmp;
			a[i] = tmp;
		}

		for(int i=0;i<n-1;i++){
			for(int j=i+1;j<n;j++){
				if(max<a[i]+a[j]&&m>=a[i]+a[j]){
					max = a[i]+a[j];
				}
			}
		}
		if(max==0){
			cout << "NONE" << endl;
			continue;
		}
		cout << max << endl;
	}
}