#include <bits/stdc++.h>
#define rep(i,a,b) for (int i = a; i < b; i++)
#define REP(i,n) rep(i,0,n)
using namespace std;

int main() {
  int n,m;
  while (cin >> n >> m, n) {
    vector<int> a(n);
    REP(i,n) cin >> a[i];
    int ans = -1;
    REP(i,n) rep(j,i+1,n) {
      int tmp = a[i]+a[j];
      if (tmp > m) continue;
      ans = max(ans,tmp);
    }
    if (ans < 0) cout << "NONE" << endl;
    else cout << ans << endl;
  }
}
