#include<stdio.h>
#include<iostream>
#include <algorithm>
	using namespace std;

	int main(){
		int data ;
			cin>>data;
			for(int n=0;n<data;n++)
			{	int i[3];
			cin>>i[0]>>i[1]>>i[2] ;
			sort(i,i+3);
				if (i[0]*i[0] + i[1]*i[1] == i[2]*i[2]){
					cout<< "YES\n";
				}else {
					cout<< "NO\n";
			}
			if ( data ==0) {
				break;
	}

	}
	 return 0;
	}
	
	