#include<iostream>

using namespace std;

int main(){
	
	int n;
	int x, y, z;
	
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> x >> y >> z;
		if(x > y && x > z){
			if((x * x) == ((y * y) + (z * z))){
				cout << "YES" << endl;
			}else{
				cout << "NO" << endl;
			}
		}else if(y > x && y > z){
			if((y * y) == ((x * x) + (z * z))){
				cout << "YES" << endl;
			}else{
				cout << "NO" << endl;
			}
		}else {
			if((z * z) == ((x * x) + (y * y))){
				cout << "YES" << endl;
			}else{
				cout << "NO" << endl;
			}
		}
		
	}
	
	return 0;
}
