#include <iostream>
#include <string>
using namespace std;

int main(){
	int N;
	cin >>N;
	string p;
	for(int i =1;i<=N;i++){
		int j,k,l;
		cin >> j;
		cin >> k;
		cin >> l;
		if(j*j+k*k==l*l||k*k+l*l==j*j||l*l+j*j==k*k)
			p = p+"YES\n";
		else
			p = p+"NO\n";
		
	}
	cout << p;

	return 0;
}