#include <iostream>
#include <map>
#include <cstring>
#include <memory.h>
#include <vector>
#include <limits.h>
#include <cstdio>
#include <queue>
#include <math.h>
#include <algorithm>

using namespace std;

int main()
{
    int caseCount;
    cin >> caseCount;
    while(caseCount--){
        int a ,b ,c;
        cin >> a >> b >> c;
        if(a * a + b * b == c * c)
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
	return 0;
}