while true
  x, y = gets.split(' ').map(&:to_i)
  break if x == 0 && y == 0
  results = []
  prices = gets.split(' ').map(&:to_i)
  (0..x-1).each do |i|
    (0..i-1).each do |j|
      sum = prices[i] + prices[j]
      results.push(sum) if sum <= y
    end
  end
  puts results.empty? ? 'NONE' : results.max
end
