#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<string>
#include<sstream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<cctype>
#include<climits>
using namespace std;
#define REP(i, j) for(int i = 0; i < j; i++)
#define FOR(i, j, k) for(int i = j; i < k; i++)
#define P pair<int, int>
const int INF = INT_MAX / 2;

int main(){
    int n;
    cin >>n;
    REP(i, n){
        int a, b, c;
        cin >>a >>b >>c;
        bool ans = false;

        if(a * a + b * b == c * c) ans = true;
        if(a * a + c * c == b * b) ans = true;
        if(b * b + c * c == a * a) ans = true;

        if(ans) cout <<"YES" <<endl;
        else cout <<"NO" <<endl;
    }

    return 0;
}