#include"stdio.h" main() { int n; scanf("%d",&n);getchar(); while(n--) { int x,y; scanf("%d %d",&x,&y); if(x>=y) printf("MMM BRAINS\n"); else printf("NO BRAINS\n"); } getchar();getchar(); return 0; }