var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var Arr=(input.trim()).split("\n");
Arr.shift();
Arr.forEach(function(v){
var arr=v.split(" ").map(Number);
arr.sort(function(a,b){return b-a;});
var a=arr[0];
var b=arr[1];
var c=arr[2];
var str="";
str=(c*c==a*a+b*b)?"YES":"NO";
console.log(str);
});