#include<iostream>
#include<algorithm>
#include<cmath>
#include <vector>
using namespace std;

int main(){
    int i,j;
    int n;
    cin >> n;
    for(i=0;i<n;i++){
        int ar[3];
        for(j=0;j<3;j++) cin >> ar[j];
        int sum = 0;
        for(j=0;j<3;j++) sum += ar[j] * ar[j];
        for(j=0;j<3;j++) if(sum==ar[j]*ar[j]*2) break;
        if(j==3) cout << "NO" << endl;
        else cout << "YES" << endl;
    }
    return 0;
}