#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
	int N;
	cin >> N;
	int A[3];
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < N; j++) {
			cin >> A[j];
		}
		sort(A, A + 3);
		if (((A[0] * A[0]) + (A[1] * A[1])) == (A[2] * A[2]))
			cout << "YES" << endl;
		else
			cout << "NO"<<endl;
	}
    return 0;
}