#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int n;
	cin >> n;
	for (int i;i<n;i++) {
		int a,b,c;
		cin >> a >> b >>c;
		int aa,bb,cc;
		if (b>a) {
			aa = b;
			bb = a;
			
		}
		else{
			aa = a;
			bb = b;
		}
		if (c>aa) {
			cc =bb;
			bb=aa;
			aa = c;
		}
		else if (c>bb) {
				cc = bb;
				bb = c;
			}
		
		if (aa*aa == bb*bb+cc*cc) cout << "YES" <<endl;
		else cout << "NO" <<endl;
	}
	return 0;
}