#include<iostream>
#include<vector>
#include<string>
using namespace std;

int main(){
	int n;
	cin >> n;
	int a[n][3];
	for (int i=0;i<n;i++){
		cin >> a[i][0];
		cin >> a[i][1];
		cin >> a[i][2];
	}
	for (int i=0;i<n;i++){
		if(a[i][0] > a[i][1] && a[i][0] > a[i][2] && a[i][0]*a[i][0]== a[i][1]*a[i][1] + a[i][2]*a[i][2]){
			cout << "YES" << endl;
		}else if(a[i][1] > a[i][0] && a[i][1] > a[i][2] && a[i][1]*a[i][1]== a[i][0]*a[i][0] + a[i][2]*a[i][2]){
			cout << "YES" << endl;
		}else if(a[i][2] > a[i][1] && a[i][2] > a[i][0] && a[i][2]*a[i][2]== a[i][1]*a[i][1] + a[i][0]*a[i][0]){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
}
