#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
	int n, m;
	while (cin >> n >> m) {
		if (n + m == 0)break;
		vector<int> v(n);
		for (int i = 0; i < n; i++)cin >> v[i];
		int ans = -1;
		for (int i = 0; i < n; i++) {
			for (int j = i + 1; j < n; j++) {
				if (v[i] + v[j] <= m)ans = max(ans, v[i] + v[j]);
			}

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

}
