#include <iostream>
#include <queue>
#include <cmath>
using namespace std;

int main()
{
    int n;          //データセットの数
    int a, b, c;    //各辺の長さ
    cin >> n;

    priority_queue<int> *qs = new priority_queue<int>[n];

    for(int i = 0; i < n; ++i){
        cin >> a >> b >> c;
        qs[i].push(a);
        qs[i].push(b);
        qs[i].push(c);
    }

    for(int i = 0; i < n; ++i){
        c = qs[i].top();
        qs[i].pop();
        a = qs[i].top();
        qs[i].pop();
        b = qs[i].top();
        if(pow(c, 2) == pow(a, 2) + pow(b, 2))
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }

    return 0;
}