#include<iostream>
using namespace std;

int main(){
	int n, a[3], max;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> a[0] >> a[1] >> a[2];
		if (a[0] >= a[1]){
			if (a[0] >= a[2]){
				max = 0;
			}
			else max = 2;
		}
		else {
			if (a[1] >= a[2]){
				max = 1;
			}
			else max = 2;
		}
		switch (max){
		case 0:
			if (((double)a[max] * a[max] / (a[1] * a[1] + a[2] * a[2])) == 1) max = 1;
			else max = 0;
			break;
		case 1:
			if (((double)a[max] * a[max] / (a[0] * a[0] + a[2] * a[2])) == 1) max = 1;
			else max = 0;
			break;
		case 2:
			if (((double)a[max] * a[max] / (a[1] * a[1] + a[0] * a[0])) == 1) max = 1;
			else max = 0;
			break;
		}
		if (max == 1){
			cout << "YES" << '\n';
		}
		else cout << "NO" << '\n';
	}
	return 0;
}