#include <stdio.h>

int main()
{
  int input_n, input_m;
  int input_a[1000];
  int cost_sum, max_cost = 0;
  int counter_i, counter_j;

  for( ; ; max_cost = 0)
  {
    scanf("%d %d", &input_n, &input_m);
    if(input_n == 0 && input_m == 0)
      break;

    for(counter_i = 0 ; counter_i < input_n ; counter_i++)
      scanf("%d", &input_a[counter_i]);

    for(counter_i = 0 ; counter_i < input_n ; counter_i++)
    {
      if(input_a[counter_i] >= input_m)
        continue;

      for(counter_j = counter_i + 1 ; counter_j < input_n ; counter_j++)
      {
        if(input_a[counter_j] >= input_m)
          continue;

        cost_sum = input_a[counter_i] + input_a[counter_j];

        if(cost_sum > max_cost && cost_sum <= input_m)
          max_cost = cost_sum;
      }
    }

    if(max_cost == 0)
      printf("NONE\n");
    else
      printf("%d\n", max_cost);
  }
  return 0;
}

