#include <iostream>

using namespace std;

int main(void){
	while(1){
		int n, m; cin >> n >> m;
		if(!n && !m) break;
		int a[1001];
		for(int i=0; i<n; i++){
			cin >> a[i];
		}

		int ans = -1;
		for(int i=0; i<n-1; i++){
			for(int j=i+1; j<n; j++){
				int tmp = a[i] + a[j];
				if(ans < tmp && tmp <= m) ans = tmp;
			}
		}

		if(ans != -1) cout << ans << endl;
		else cout << "NONE" << endl;
	}
	return 0;
}
