#include<bits/stdc++.h>
using namespace std;

int main(){

  while(1){
    int n, m; cin >> n >> m;
    if(!n) break;

    vector<int> a(n);
    for(int i = 0; i < n; i++) cin >> a[i];

    vector<int> b;
    for(int i = 0; i < n; i++){
      for(int j = i + 1; j < n; j++){
	b.push_back(a[i] + a[j]);
      }
    }


    int ans = -1;
    for(auto x : b){
      if(x <= m) ans = max(ans, x);
    }

    if(ans == -1) cout << "NONE" << endl;
    else cout << ans << endl;

  }

  return 0;
}

