#include <stdio.h>

int main(){
  int n, m, i, j, max, sum;
  int item[1000];

  while(1){
    scanf("%d %d", &n, &m);
    if(n == 0 && m == 0)
      break;
    max = 0;
    sum = 0;
    for(i = 0; i < n; ++i)
      scanf("%d", &item[i]);
    for(i = 0; i < n - 1; ++i)
      for(j = i + 1; j < n; ++j){
	sum = item[i] + item[j];
	if(sum > max && sum <= m)
	  max = sum;
      }
    if(max == 0)
      printf("NONE\n");
    else
      printf("%d\n", max);
  }
  return 0;
}

