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

int main() {
    int n, m;
    while (cin >> n >> m, n | m) {
        int a[n];
        for (int i = 0; i < n; i++) cin >> a[i];
        int f = 1, ans = -1;
        for (int i = 0; i < n; i++) {
            for (int j = i + 1; j < n; j++) {
                if (a[i] + a[j] <= m) {
                    ans = max(ans, a[i] + a[j]);
                    f = 0;
                }
            }
        }
        if (f)
            cout << "NONE" << endl;
        else 
            cout << ans << endl;
    }
    return 0;
}
