#include<iostream>
#include<cstdio>
#include<math.h>

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(pow(a,2)+pow(b,2) == pow(c,2)){
			cout << "YES" <<endl;
		}else if(pow(a,2)+pow(c,2) == pow(b,2)){
			cout << "YES" <<endl;
		}else if(pow(b,2)+pow(c,2) == pow(a,2)){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}

    return 0;
}