/*
C++ ???????????????????????????????????¬??????
??????AOJ-ITP1??????????????????
*/
#define _USE_MATH_DEFINES

#include <iostream> // ?¨??????\??????
#include <fstream>  // ??????????????\??????
#include <string>   // ???????????¢???
#include <vector>   // ???????????????
#include <cmath>    // ??°??????
#include <iomanip>  // stream???????????¢???
#include <algorithm>// max??¢??°??????

using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;        // ????´???°????????????????????????
using std::fixed;         // ???????????????????¨???????????????????????????????
using std::setprecision;  // ?????°????°???°?????\???????????°????????????????????¨????????\???
using std::sort;
int main() {
	int num;
	int sides[3];

	cin >> num;
	for (size_t i = 0; i < num; i++)
	{
		int a = 0;
		int b = 0;
		int c = 0;

		cin >> sides[0] >> sides[1] >> sides[2];
		sort(sides, sides+3);
		for (size_t j = 0; j < 3; j++)
		{
			// ?????§??????
			a = std::pow(sides[0], 2);
			b = std::pow(sides[1], 2);
			c = std::pow(sides[2],2);	
		}
		if ((a + b) == c) {
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}

	return 0;
}