#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  int n,m;
  while(cin>>n>>m,n){
    int a[n];
    for(int i=0;i<n;i++) cin>>a[i];
    int ans=0;
    for(int i=0;i<n;i++){
      for(int j=i+1;j<n;j++){
	if(a[i]+a[j]>m) continue;
	ans=max(ans,a[i]+a[j]);
      }
    }
    if(ans) cout<<ans<<endl;
    else cout<<"NONE"<<endl;
  }
  return 0;
}