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

int main(void){
    int i, N, hen[3]={};
    cin >> N;
    for(i=0; i<N; i++){
        cin >> hen[0] >> hen[1] >> hen[2];
        sort(hen, hen+3);
        if(hen[2]*hen[2]==hen[0]*hen[0]+hen[1]*hen[1]) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}