#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=int(a);i<int(b);++i)
using namespace std;
typedef long long ll;
int INF = (1LL << 30) - 1;
int MOD = 1e9+7;
int main(){
    int N,M;
    cin >> N >> M;
    while(N){
        vector<ll> V(N);
        rep(i,0,N)cin >> V[i];
        ll maxi = 0;
        rep(i,0,N)rep(j,i+1,N){
            if(V[i] + V[j] <= M)maxi = max(maxi, V[i] + V[j]);
        }
        if(maxi == 0)cout << "NONE" << endl;
        else cout << maxi << endl;
        cin >> N >> M;
    }
}
