#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
template <typename T> using V = vector<T>;

bool solve() {
    ll N, M;
    cin >> N >> M;
    if(!(N + M)) return false;
    V<ll> A(N);
    for(ll &e : A) cin >> e;
    ll ans = -1;
    for(ll i = 0; i < N; i++) {
        for(ll j = i + 1; j < N; j++) {
            if(A[i] + A[j] > M) continue;
            ans = max(ans, A[i] + A[j]);
        }
    }
    if(ans != -1) cout << ans;
    else cout << "NONE";
    cout << endl;
    return true;
}

int main() {
    while(solve());
    return 0;
}

