#include<bits/stdc++.h>
using namespace std;

int main(){
	int N;
	int A;
	int B;
	int C;
	string Ans[1000];
	cin>>N;
	for(int i = 0;i<N;i++){
		cin>>A>>B>>C;
		int MAX = max(A,max(B,C));
		if(MAX==A){
			if(A*A == B*B+C*C)
				Ans[i] = "YES";
			else
				Ans[i] = "NO";
		}
		else{
				if(MAX==B){				
					if(B*B==A*A+C*C)
						Ans[i] = "YES";
					else
						Ans[i] = "NO";
				}
				else{					
					if(C*C == A*A+B*B)
					Ans[i] = "YES";
					else
					Ans[i] = "NO";
				}
		}
	}
	for(int o = 0;o<N;o++){
		cout<<Ans[o]<<endl;
	}
}