#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main() {
	int n,m;
	while (cin >> n >> m && n&&m) {
		vector<int> a(n);
		int maxv = 0;
		for (int i = 0; i < n; ++i) cin >> a[i];
		sort(a.begin(), a.end());
		for (int i = 0; i < n - 1; ++i) {
			for (int j = i + 1; j < n; ++j) {
				if (a[i] + a[j] <= m) maxv = max(maxv, a[i] + a[j]);
				else break;
			}
		}
		if (maxv) cout << maxv << endl;
		else cout << "NONE" << endl;
	}
	return 0;
}
