const input = require('fs').readFileSync('/dev/stdin', 'utf8');
const lines = input.trim().split('\n');
while ((first = lines.shift()) && (second = lines.shift())) {
	var purchase = 0
	const [n, max] = first.split(' ').map(Number)
	const prices = second.split(' ').map(Number)
	for (var i=0; i<n; i++) {
		for (var j=0; j<n; j++) {
			if (i!=j && max >= prices[i]+prices[j] && purchase < prices[i]+prices[j]) {
				purchase = prices[i]+prices[j]
			}
		}
	}
	purchase ? console.log(purchase) : console.log("NONE")
} 

