#include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <iomanip>
#include <queue>
using namespace std;


int GetDigit(int n){
	int i = 0;

	while(n > 0){
		n /= 10;
		i++;
	}

	return i;
}
 
int main(){
	vector<int> a(3);
	int n, tmp;

	cin >> n;

	for(int i = 0; i < n; i++){
		for(int j = 0; j < 3; j++){
			cin >> a[j];
		}
		sort(a.begin(), a.end());

		if(a[0]*a[0] + a[1]*a[1] == a[2]*a[2]){
			cout << "YES" <<endl;
		}else{
			cout << "NO" <<endl;
		}
	}

	return 0;
}