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

int main(){
	const int N = 1000;
	int n,a[N],b[N],c[N];
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a[i]>>b[i]>>c[i];
	}
	for(int i=1;i<=n;i++){
		if(a[i]*a[i] + b[i]*b[i] == c[i]*c[i] || a[i]*a[i] == b[i]*b[i] + c[i]*c[i] || a[i]*a[i] + c[i]*b[i] == b[i]*c[i]){
			cout<<"YES"<<endl;
		}
		else cout<<"NO"<<endl;
	}
}