#include<iostream>
using namespace std;

int main()
{
	int n, a[1000][3];
	cin >> n;
	for (int i = 0;i < n;i++) {
		cin >> a[i][0] >> a[i][1] >> a[i][2];
		int x = a[i][0] * a[i][0], y = a[i][1] * a[i][1], z = a[i][2] * a[i][2];
		if (x == y + z || y == z + x || z == x + y) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
    return 0;
}

