//1616

#include <stdio.h>

int main(void)
{
    int n, m, i, j, a[1000000], max = 0, tmp;

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

        max = 0;

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

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