#include<bits/stdc++.h>
#define ll long long 
#define ull unsigned long long 
#define ld long double
#define ui unsigned int 
using namespace std;
int main()
{
	int t;
	cin >> t;
	while (t--) {
		int arr[3];
		for (int i = 0; i < 3; i++) {
			cin >> arr[i];
		}
		sort(arr, arr + 3);
		arr[0] *= arr[0];
		arr[1] *= arr[1];
		int s = arr[0] + arr[1];
		if (s != (arr[2] * arr[2])) {
			cout << "NO" << endl;
		}
		else
			cout << "YES" << endl;
	}
}


