#include <stdio.h>
int main(void){
   int n, m, i, j, SUM, catalog[1000]={}, tmp;
   
   while(1){
    scanf("%d %d", &n, &m);
    
    if(n==0 && m==0) break;
   
    tmp=0;
    SUM=0;
    for(i=1; i<=n; i++){
           scanf("%d", &catalog[i]);
       }
       for(i=1; i<=n; i++){
           for(j=i+1; j<=n; j++){
               tmp=catalog[i]+catalog[j];
               if(tmp<=m && tmp>SUM) SUM=tmp;
           }
       }
       if(SUM==0){
           printf("NONE\n");
       }
       else printf("%d\n", SUM);
       
   }
       return 0;
}

