#include<iostream>
using namespace std;

int main(){
    int n, m;
    
    while(true){
        cin >> n >> m;
        if (n==0 && m==0) break;
        int ma=0, list[n];
        for (int i=0; i<n; i++) cin >> list[i];
        for (int i=0; i<n-1; i++){
            for (int j=i+1; j<n; j++){
                int sum = list[i] + list[j];
                if (sum<=m) ma = max(ma,sum);
            }
        }
        if (ma==0) cout << "NONE" << endl;
        else cout << ma << endl;
    }
}
