#include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
using namespace std;

int main(){
    int n, x[3], i;
    cin >> n;
    REP(i, n){
        int y[3];
        cin >> x[0] >> x[1] >> x[2];
        sort(x, x+3);
        REP(j, 3)
            y[j] = x[j] * x[j];
        if(y[2] == y[0]+y[1])
            printf("YES\n");
        else
            printf("NO\n");
    }
}

