#include <iostream>
#include <algorithm>

int main(){
	using namespace std;
	while(1){
		int n;
		long long int a[3] = { 0 };
		cin >> n;
		if(cin.eof() || n == 0) break;
		for(int i = 0;i<n;i++){
			cin >> a[0] >> a[1] >> a[2];
			sort(a,a+3);
			if((a[2]*a[2]) == (a[0]*a[0])+(a[1]*a[1])) cout << "YES" << endl;
			else cout << "NO" << endl;
		}
	}
	return 0;
}