#include <stdio.h>

int main(){

  int n, m, total, pricemax;
  int price[1024];

  while(1){
    scanf("%d %d", &n, &m);
    if( (n == 0)&&(m == 0) ) break;
    for(i = 0; i < n; i++){
      scanf("%d", price[i]);
    }

    total = 0;
    pricemax = 0;

    for(i = 0; i < n - 1; i++){
      for(j = i+1; j < n; j++){
        total = price[i] + price[j];
        if( (total > pricemax)&&(total <= m) ){
          pricemax = total;
        }
      }
    }
    if(pricemax == 0){
      printf("NONE\n");
    }else{
      printf("%d\n", pricemax);
    }

  }

  return 0;
}

