const input = require('fs').readFileSync('/dev/stdin', 'utf8');
const lines = input.trim().split('\n');
while (line = lines.shift()) {
	const [n, max] = line.split(' ').map(Number);
	if (n === 0 && max === 0) { break; }
	const prices = lines.shift().split(' ').map(Number);
	let temp = 0;
	for (let i = 0; i <= n; i++) {
		for (let j = 0; j <= n; j++) {
			if (!prices[i] || !prices[j] || i === j) {
				continue;
			}
			const tempCalc = prices[i] + prices[j];

			if (tempCalc <= max && tempCalc > temp) {
				temp = tempCalc;
			}
		}
	}
	console.log(`${temp ? temp : 'NONE'}`)
} 

