#include <iostream>
#include <algorithm>
#include <cstdio>
#include <string>

using namespace std;

int main(){
	int n;
	int a[3];
	cin >> n;
	while(n){
		string s;
		for(int i = 0; i < 3; i++){
			cin >> a[i];
		}
		sort(a, a+ 3);
		if(a[2] * a[2] == a[1] * a[1] + a[0] * a[0]) s = "YES\n";
		else s = "NO\n";
		cout << s;
		n--;
	}
	return 0;
}