#include<iostream>
#include<math.h>
using namespace std;

//exchange x for y
void swap(int& x, int& y){
    int t = x;
    x = y;
    y = t;
}

//judge if this data set is right triangle
bool judgeRightTriangle(int& a, int& b, int& c){
    //arrange in ascending order
    if(a > b) swap(a, b);
    if(b > c) swap(b, c);
    //judge
    if(pow(c, 2) == pow(a, 2) + pow(b, 2)){
        return true;
    } else{
        return false;
    }
}

int main(){
    //入力
    int num = 0;
    cin >> num;

    //判定
    int a, b, c;
    bool check[num];
    for(int i = 0;i < num;i++){
        cin >> a >> b >> c;
        check[i] = judgeRightTriangle(a, b, c);
    }
    //出力
    for(int i = 0;i < num;i++){
        if(check[i] == true){
            cout << "YES\n";
        } else{
            cout << "NO\n";
        }
    }
    return 0;
}
