#include<iostream>
using namespace std;

int main()
{
    int n, m;

    while( cin >> n >> m )
    {
        if( n + m == 0 )
            break;

        int a[n], max = 0;
        for( int i = 0; i < n; i++ )
            cin >> a[i];

        for( int i = 0; i < n - 1; i++ )
            for( int j = i + 1; j < n; j++ )
                if( a[i] + a[j] > max && a[i] + a[j] <= m )
                    max = a[i] + a[j];

        if( !max )
            cout << "NONE" << endl;
        else
            cout << max << endl;
    }

    return 0;
}

