#include<iostream>
#include<string>
#include<algorithm>
#include<cstdio>
using namespace std;
int main() {
	int a;
	cin >> a;
	for (int b = 0; b < a; b++) {
		int c[3];
		cin >> c[0] >> c[1] >> c[2];
		sort(c, c + 3);
		if (c[0] * c[0] + c[1] * c[1] == c[2] * c[2])puts("YES");
		else puts("NO");
	}
}