#include<iostream>

#define MAX_N 1000

int main(){
  int n,m;
  int a[MAX_N] = {};
  while(1){
    std::cin >> n >> m;
    if(n == 0&&m==0) break;
    int max;
    for(int i=0;i<n;i++){
      std::cin >> a[i];
    }
    max = 0;
    for(int i=0;i<n-1;i++){
      for(int j=i+1;j<n;j++){
	if(max < a[i]+a[j] && a[i]+a[j] <= m){
	  max = a[i]+a[j];
	  if(max == m) break;
	}
      }
    }
    if(max == 0){
      std::cout << "NONE\n";
    }else{
      std::cout << max << '\n';
    }
  }
  return 0;
}

