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

int main()
{
	int n, m;
	while (cin >> n >> m, n | m) {
		vector<int> a(n);
		for (int i = 0; i < n; i++) {
			cin >> a[i];
		}
		int res = -1;
		for (int i = 0; i < n; i++) {
			for (int j = i + 1; j < n; j++) {
				if (a[i] + a[j] <= m) {
					res = max(res, a[i] + a[j]);
				}
			}
		}
		if (res == -1) puts("NONE");
		else printf("%d\n", res);
	}
	return 0;
}

