#include<stdio.h>
int main(void)
{
  int n,m,a[1000],i,j,max;

  while(scanf("%d %d",&n,&m)){

    max = 0;
    
    if(n==0 && m==0) break;

    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 && a[i]+a[j]<=m && a[i]+a[j]>max) max = a[i]+a[j];
      }
    }

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

  return 0;
}

