#include <iostream>
#include <algorithm>
#include <math.h>
using namespace std;

int main() {
	int a, n[3];
	cin >> a;
	
	while(cin >> n[0] >> n[1] >> n[2]){
		sort(n, n + 3);
		for(int i = 0; i < 3; i++){
			n[i] = pow(n[i], 2);
		}
		
		if(n[0] + n[1] == n[2]){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}