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

namespace CSharpPractice
{
	class Program
	{
		static bool IsRightTriangle(int a, int b, int c)
		{
			return a * a + b * b == c * c;
		}
		static void Main(string[] args)
		{
			int n = int.Parse(Console.ReadLine());
			for (int j = 0; j < n; j++)
			{
				List<int> list = new List<int>();
				foreach (string val in Console.ReadLine().Split(' '))
				{
					list.Add(int.Parse(val));
				}
				bool flg = false;
				for (int i = 0; i < 3; i++)
				{
					flg |= IsRightTriangle(list[i], list[(i + 1) % 3], list[(i + 2) % 3]);
				}
				Console.WriteLine(flg ? "YES" : "NO");
			}
		}
	}
}