#include <iostream>
using namespace std;
int main(){
    int a,x,y,z;
    cin >> a;
    int m[3][a];
    for (int i=0;i<a;i++){
        cin >> x >> y >> z ;
        m[0][i] = x;
        m[1][i] = y;
        m[2][i] = z;
    }
    for (int j=0;j<a;j++){
        if (m[0][j]^2+m[1][j]^2!=m[2][j]^2 && m[0][j]^2+m[2][j]^2!=m[1][j]^2 && m[1][j]^2+m[2][j]^2!=m[0][j]^2)
            cout << "NO" << endl;
        else
            cout << "YES" << endl;
    }
}