#include<iostream>
#include<cstdio>

using namespace std;

int N;
int a,b,c;

int main(){
	cin >> N;

	for(int i=0;i<N;i++){
		cin >> a >> b >> c;

		if((a^2)+(b^2) == (c^2)){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}

    return 0;
}