#include<stdio.h>

#define P(c)		( putchar(c) )
#define PP(c, d, e)	( P(c), P(d), P(e) )

int main(void)
{
	int    i  = 0, j  = 63;
	double m5 = 0, m1 = 0;

	double date5[7] = {35.5, 37.5, 40, 43, 50, 55, 70};
	double date1[7] = {71, 77, 83, 89, 105, 116, 148};
	int    c[7]     = {65, 64, 63, 63, 63, 63, 63};

	scanf("%lf %lf", &m5, &m1);

	for(i = 0; i < 7; i++)
	{
		if(m5 < date5[i] && m1 < date1[i])
		{
			do
			{
				P( c[i] + i );
			}
			while(c[i] - j++ > 0);

			P('\n');

			return 0;
		}
	}

	PP('N', 'A', '\n');

	return 0;
}