#include<iostream>
using namespace std;

int main(){

	int n;
	for(cin >> n;n > 0;--n){
		int a, b, c, t;
		cin >> a >> b >> c;
		if(a>b && a>c){t=a;a=c;c=t;}
		if(a<b && b>c){t=b;b=c;c=t;}
		if(a*a + b*b == c*c)cout << "YES\n";
		else cout << "NO\n";
	}
	return 0;
}