#include <iostream>
#include <algorithm>

int main(){

	int a[3];
	int i,j;

	std::cin >> j;

	for(i=0;i<j;i++){
		std::sort(a,a+3);
		if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1]){
			std::cout << "YES" << std::endl;
		}
		else{
			std::cout << "NO" << std::endl;
		}
	}
}