

#include "stdio.h"


int main()
{
	int n, m, i, j, num;
	int max = 0;
	int a[1001] = { 0 };

	while (1) {
		scanf("%d %d", &n, &m);
		if (n == 0 && m == 0) {
			break;
		}


		for (i = 0; i < n; i++) {
			scanf("%d", &a[i]);
		}

		for (i = 0; i < n - 1; i++) {
			for (j = i+1 ; j < n; j++) {
				num = a[i] + a[j];
				if (num <= m) {
					if (num > max) {
						max = num;
					}
				}
			}
		}

			if (max == 0) {
				printf("NONE\n");
			}
			else {
				printf("%d\n", max);
			}
			max = 0;
	}
		return 0;
}

