#include<iostream>
#include<algorithm>
#include<queue>
#define YES 1
#define NO 0
using namespace std;

int main(){
	int num, a, b, c, temp;
	queue<int> ans;
	
	cin >>num;
	
	for(int i = 0; i < num; i++){
		cin >>a >>b >>c;
		
		if(a > b){
			if(a > c);
			if(c > a) swap(a, c);
		} else{
			if(b > c) swap(a, b);
			if(c > b) swap(a, c);
		}
		
		if((a * a) == (b * b) + (c * c)) ans.push(YES);
		else ans.push(NO);
	}
	
	for(int i = 0; i < num; i++){
		temp = ans.front();
		if(temp == YES) cout <<"YES"<<endl;
		else cout <<"NO"<<endl;
		ans.pop();
	}
	
	return 0;
}