#include<iostream>
#include<string>
using namespace std;
int main() {
	int dataset,a,b,c;
	string triangle[1000];
	cin >> dataset;
	for (int i = 0; i < dataset; i++){
		cin >> a >> b >> c;
		if (a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b){
			triangle[i] = "YES";
		}
		else
		{
			triangle[i] = "NO";
		}
	}
	for (int i = 0; i < dataset; i++){
		cout << triangle[i]<<"\n";
	}
	cin >> a;
}