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

bool tri(int x,int y,int z){
	return (x*x+y*y==z*z)?1:0;
}

int main(){
	int n;
	cin>>n;
	int a[3];
	for(int i=0;i<n;i++){
		cin>>a[0]>>a[1]>>a[2];
		sort(a,a+3);
		if (tri(a[0],a[1],a[2])) cout<<"YES\n";
		else cout<<"NO\n";
	}
	return 0;
}