#include <iostream>
using namespace std;

int main(){
	int i;
	cin >> i;
	for(i;i>=1;i--){
	
	int a, b,c;
	cin >>a;
	cin >>b;
	cin >>c;
	if(a*a+b*b==c*c|b*b+c*c==a*a|c*c+b*b==a*a)
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
	}
		
	return 0;
}