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

int main(void){
  int n,m,i,j,sum;
  int a[1000],max = 0;;

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

  for(i=0;i<n;i++){
    for(j=0;j<n;j++){
      if(i != j){
	sum = a[i] + a[j];
	if(sum > max && sum <= m){
	  max = sum;
	}
      }
    }
  }
  if(max == 0){
    printf("NONE\n");
  }else{
    printf("%d\n",max);
  }
  return 0;
}

