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

void sort(int* rep) {
	bool flg = true;
	int temp;

	do{
		flg = false;
		if (rep[0] < rep[1]) {
			temp = rep[0];
			rep[0] = rep[1];
			rep[1] = temp;
			flg = true;
		}
		if (rep[1] < rep[2]) {
			temp = rep[1];
			rep[1] = rep[2];
			rep[2] = temp;
			flg = true;
		}
	} while (flg);
}




int main() {

	int size;

	cin >> size;

	int a[3];
	int ans[1000];

	for (int i = 0; i < size; i++) {
		for (int j = 0; j < 3; j++)cin >> a[j];
		sort(a);

		if (a[0] * a[0] == a[1] * a[1] + a[2] * a[2]) {
			ans[i] = true;
		}
		else {
			ans[i] = false;
		}
	}

	for (int i = 0; i < size; i++) {
		if (ans[i])printf("YES\n");
		else printf("NO\n");
	}

	//system("pause");
	return 0;
}
