#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define FOR(i,x,n) for(int i=x; i<(n); i++)
#define ALL(n) begin(n),end(n)
#define MOD (1000000007)
#define INF (1e9)
#define INFL (1e18)
 
typedef long long ll;
typedef unsigned int ui;
typedef unsigned long long ull;
template<class T>using arr=vector<vector<T>>;
template<class T>void pr(T x){cout << x << endl;}
template<class T>void prvec(vector<T>& a){rep(i, a.size()-1){cout << a[i] << " ";} cout << a[a.size()-1] << endl;}
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

void IsRightTriangle(int a, int b, int c){
    a *= a;
    b *= b;
    c *= c;
    if(a == b + c || b == c + a || c == b + a) pr("YES");
    else pr("NO");
}

int main()
{
    int n; cin >> n;
    rep(i, n){
        int a, b, c; cin >> a >> b >> c;
        IsRightTriangle(a, b, c);
    }
    return 0;}
