#include<iostream>
#include<algorithm>

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 * x + y * y == z * z ||
            x * x + z * z == y * y ||
            z * z + y * y == x * x ){
            cout << "YES";
        }else{
              cout << "NO";
        }
        cout << endl;
	}
    
	return 0;
}