#include<stdio.h>

int main(void)
{
  int i,j,n,m,a[1000],s,s1;

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