#include <stdio.h>
int is[10000];
int main(int argc, char *argv[])
{
    for(;;) {
        int n, m;
        scanf("%d %d", &n, &m);
        if(n == 0 && m == 0) break;
        for(int i = 0; i < n; i++) {
            int c;
            scanf("%d", &c);
            is[i] = c;
        }
        int best = -1;
        for(int i = 0; i < n; i++) {
            for(int j = i+1; j < n; j++) {
                int k = is[i] + is[j];
                if( k <= m && k > best) best = k;
            }
        }
        if(best < 0) printf("NONE\n");
        else printf("%d\n", best);
    }
    return 0;
}
