#include<cstdio>
#include<algorithm>
using namespace std;
typedef long long ll;

ll n, m, a[1000], mx;

int main() {
  while (scanf("%lld%lld", &n, &m), n) {
    for (ll i = 0; i < n; i++) scanf("%lld", &a[i]);
    mx = -1;
    for (ll i = 0; i < n; i++) for (ll j = i+1; j < n; j++) if (a[i] + a[j] <= m) mx = max(a[i]+a[j], mx);
    if (mx == -1) printf("NONE\n");
    else printf("%lld\n", mx);
  }
}

