#include<Stdio.h>
int main(void){
    int n,m,i,j,total,max,x,s[100];
    while(1){
        scanf("%d",&n);
        scanf("%d",&m);
        if(n==0){
            break;
        }
        for(i=0;i<n;i++){
            scanf("%d",&s[i]);
        }
        for(i=0;i<n;i++){
            total=s[i];
            if(i==0){
                max=total;
            }
            for(j=i;j<n;j++){
                if(max<total+s[j]){
                    max=total+s[j];
                }
            }
        }
        if(max=<m){
            printf("%d\n");
        }else{
            printf("NONE\n");
        }
    }
    
}
