#include <bits/stdc++.h>
using namespace std;

int main(void){
	int n, m;
	while(true){
		cin >> n >> m;
		if(!n&&!m) break;
		vector<int> a(n);
		for(int i = 0; i < n; ++i){
			cin >> a[i];
		}
		int ans = 0, sum;
		for(int i = 0; i < n-1; ++i){
			for(int j = i+1; j < n; ++j){
				sum = a[i] + a[j];
				if(sum > m) continue;
				ans = max(sum, ans);
			}
		}
		if(ans){
			cout << ans << endl;
		}else{
			cout << "NONE" << endl;
		}
	}
	return 0;
}
