#include<iostream>
#include<algorithm>
#include<vector>
#include<cmath>


using namespace std;

bool check(int a,int b,int c){
	if(a*a+b*b==c*c)return true;
	else false;
}

int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a,b,c;
		vector<int> hoge;
		cin>>a>>b>>c;

		
		cout<< ( ( check(a,b,c) || check(c,a,b) || check(b,c,a))==true ? "YES" : "NO")<<endl;
	}
	return 0;
}