#include <cstdio>
#include <queue>
#include <vector>

using namespace std;

bool Check(int n,int m,int l){
	if(n == m && m == l && l == n){ return false; }
	priority_queue<int> q;
	q.push(n);
	q.push(m);
	q.push(l);
	int a,b,c;
	c = q.top();
	q.pop();
	b = q.top();
	q.pop();
	a = q.top();
	q.pop();
	if(a * a + b * b == c * c){
		return true;
	}else{
		return false;
	}
}

int main(){
	int n;
	int a,b,c;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%d %d %d",&a,&b,&c);
		if(Check(a,b,c)){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}