#include <iostream>
#include <stdio.h>
#include <cmath>

#define MAX(a,b) (a > b ? a : b)
int main(void){
	int c;
	scanf("%d",&c);
	for(;c;c--){
		int x,y,z;
		bool f;
		scanf("%d%d%d",&x,&y,&z);
		if(MAX(z,MAX(x,y))==x)
			f = (pow(y,2) + pow(z,2) == pow(x,2));
		else{
			if(MAX(z,MAX(x,y))==y)
				f = (pow(x,2) + pow(z,2) == pow(y,2));
			else
				f= (pow(x,2)+pow(y,2)==pow(z,2));
		}
		std::cout << (f?"YES":"NO") << std::endl;
	}
	return 0;
}
		