#include<iostream>
#include<vector>
#include<algorithm>
#include<string>

#define add push_back
#define inf 2147000000

#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

int main(void){
	int a[3];
	int n;
	scanf("%d",&n);
	rep(q,n){
		scanf("%d%d%d",&a[0],&a[1],&a[2]);
	
		sort(a,a+3);
		
		if(a[0]*a[0] + a[1]*a[1] == a[2]*a[2]){
			cout<<"YES\n";
		}else{
			cout<<"NO\n";
		}
	}
}