#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<string>
#include<functional>
#include<queue>
#include<math.h>
#define INF 999999

using namespace std;

int max_three(int a, int b, int c)
{
	int max_ab = max(a, b);
	int ans = max(max_ab, c);

	return ans;
}

int main()
{
	int n;
	cin >> n;

	int a[3];
	vector<string> ans;
	for (int i = 0; i < n; i++) {
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		if (a[2] * a[2] == a[0] * a[0] + a[1] * a[1]) {
			ans.push_back("YES");
		}
		else ans.push_back("NO");
		
	}

	for (int i = 0; i < ans.size(); i++) {
		cout << ans[i] << endl;
	}

	return 0;
}