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

while(scanf("%d %d",&n,&m))
{
 if(n == 0&&m== 0)
	break;
 for(i=0;i<n;i++)
 {
  scanf("%d",&a[i]);
 }
 max = 0;
  for(i=0;i<n;i++)
  {
  	 for(j=i+1;j<n+1;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;
}
