#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1e9 + 7/*998244353*/;
const ll INF = 1LL << 60;
ll mod_pow(ll, ll, ll); ll mod_fact(ll, ll); ll mod_inv(ll, ll); ll gcd(ll, ll); ll lcm(ll, ll);
//
int main(){
    int n;
    cin >> n;
    vector<string> s;
    for(int i = 0; i < n; i++){
        vector<int> nums(3);
        cin >> nums[0] >> nums[1] >> nums[2];
        sort(nums.begin(), nums.end());
        if(nums[0] * nums[0] + nums[1] * nums[1] == nums[2] * nums[2]) s.push_back("YES");
        else s.push_back("NO");
    }
    for(int i = 0; i < n; i++) cout << s[i] << "\n";
}
