#include<iostream>
#include<algorithm>

using namespace std;

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