#include <iostream>
#include <string>
using namespace std;

int main(){
	int n;
	cin >> n;
	int a[n],b[n],c[n];
	string ans[n];
	for(int i = 0;i < n;i++){
		cin >> a[i] >> b[i] >> c[i];
		if(a[i]*a[i] == b[i]*b[i] + c[i]*c[i] || b[i]*b[i] == c[i]*c[i] + a[i]*a[i] || c[i]*c[i] == a[i]*a[i] + b[i]*b[i]) ans[i] = "YES";
		else ans[i] = "NO";
	}

	for(int i = 0;i < n;i++){cout << ans[i] << endl;}

	return 0;
}