using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp21
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int t = int.Parse(Console.ReadLine());
            string rez = "";
            for(int q = 0;q<t;q++)
            {
                string[] red = Console.ReadLine().Split(' ');
                int n = int.Parse(red[0]);
                int m = int.Parse(red[1]);
                int[,] lazar = new int[n, m];
                int[,] ugljesa = new int[n, m];
                int[,] momir = new int[n,m];
                Console.WriteLine("NE");
            }
        }
    }
}