#include<cstdio>
#include<algorithm>
#include<vector>
#include<iostream>
using namespace std;

int main(){
	int n;
	cin >> n;
	vector<char*> s;
	for(int i=0;i<n;++i){
		int a[3];
		scanf("%d %d %d",a,a+1,a+2);
		sort(a,a+3);
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2])
			s.push_back("YES\n");
		else
			s.push_back("NO\n");
	}
	for(int i=0;i<n;++i)
		cout << s[i];
	return 0;
}