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

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

int main(void)
{
  while (1){
    int nitems,money_limit,price,max_sum,*items;
    scanf("%d %d",&nitems,&money_limit);
    if (nitems == 0 && money_limit == 0){
      return 0;
    }
    items = (int*)malloc(sizeof(int) * nitems);

    for (int i=0;i < nitems;i++){
      scanf("%d",&price);
      items[i] = price;
    }

    qsort(items,nitems,sizeof(int),intcmp);
  
    if (items[0]+items[1] > money_limit){
      
      printf("%s\n","NONE");
      continue;
    }
    int idx=0,max_below_limit=0;
    for (int j=nitems - 1;j > 0;--j){
      for (int k=j - 1;k >= 0;--k){
        max_sum = items[j] + items[k];
        if (max_sum <= money_limit && max_below_limit < max_sum){
          max_below_limit = max_sum;
          idx++;
        }
      }
    }
    printf("%d\n",max_below_limit);
  }
}

