#include<iostream>
#include<algorithm>
#include<functional>
using namespace std;
#define rep(i,n) for(i = 0;i < n;i++)

int N;
int main(){
	int i;
	char *str[1001];
	cin >> N;
	rep(i,N){
		int l[3];
		cin >> l[0] >> l[1] >> l[2];
		sort(l,l+3,greater<int>());
		if(l[0]*l[0] == l[1]*l[1]+l[2]*l[2])
			str[i] = "YES";
		else
			str[i] = "NO";
	}
	rep(i,N){
		cout << str[i] << endl;
	}
	return 0;
}