#include <iostream>
using namespace std;
int main(){
    int a,b,c,n;
    cin >> n;
    for (;0<n;n--){
        cin >> a >> b >> c;
        if (a^2+b^2!=c^2 && a^2+c^2!=b^2 && b^2+c^2!=a^2)
            cout << "NO" << endl;
        else
            cout << "YES" << endl;
    }
}