#include<iostream>
using namespace std;

int main() {
	int n;
	int a, b, c;
	for(cin>>n; n>0; --n) {
		cin>>a>>b>>c;
		
		int p;
		if(a>b) {
			p=a;
			a=b;
			b=p;
		}

		if(b>c) {
			p=b;
			b=c;
			c=p;
		}
		if(a>b) {
			p=a;
			a=b;
			b=p;
		}

		//cout<<a<<b<<c<<endl;
		if(a*a + b*b == c*c) {
			cout<<"YES"<<endl;
		} else {
			cout<<"NO"<<endl;
		}
	}
}