#include<stdio.h>
#include<stdlib.h>

int qtmp(const void *a,const void *b){
    return *(int*)a - *(int*)b;
}

int main(void){
    int n,m;
    int i,j;

    while(1){
    scanf("%d %d",&n,&m);
    
    if(n==0 && m==0)break;

    int v[n];

    for(i=0;i<n;i++){
        scanf("%d",&v[i]);
    }

    qsort(v,n,sizeof(int),qtmp);

    int ans = -1;
    for(i=0;i<n-1;i++){
        for(j=i+1;j<n;j++){
            if(v[i] + v[j] > ans && v[i] + v[j] <= m){
                ans = v[i] + v[j];
            }
        }
    }

    if(ans == -1){
        printf("NONE\n");
    }
    else{
        printf("%d\n",ans);
    }
    
    }
    return 0;
}
