//
//  main.cpp
//  b
//
//  Created by h3037178 on 2017/07/31.
//  Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//

#include <iostream>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
    int a,b,c,i;
    cin >> i;
    for(int n = 0;n < i;n++){
        cin >> a >> b >> c;
        if(a*a == b * b + c * c){
            cout << "YES" << endl;
        } else if(b*b == a * a + c * c){
            cout << "YES" << endl;
        } else if(c*c == b * b + a * a){
            cout << "YES" << endl;
        } else {cout <<"NO" << endl;} 
    }
}