#include<iostream>
using namespace std;

int main(){
	int n;
	cin >> n;

	int a[1000],b[1000],c[1000];
	for(int i = 0;i<n;i++){
		cin >> a[i] >> b[i] >> c[i];
		if (a[i]>b[i]){int g = b[i];b[i] = a[i];a[i] = g;}
		if (b[i]>c[i]){int g = c[i];c[i] = b[i];b[i] = g;}
	}	
	for (int i=0;i<n;i++){
		if(a[i]*a[i]+b[i]*b[i]==c[i]*c[i])
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
    return 0;
}