function Main(input) {
	var input = input.split("\n");
    var  N = Int(input[0]);
    for(var i=1;i<=N;i++){
        var side = input[i].split(" ");
        for(var j =0;j<3;j++){
            side[j]=Int(side[j]);
        }
        side.sort(descendingOrder);
        if(side[0]*side[0]==side[1]*side[1]+side[2]*side[2]){
            output("YES");
        }else{
            output("NO");
        }
    }
}
//??°??????????????¢??°??¨(??????)
function ascendingOrder(val1,val2){
    return val1 - val2;
}
//??°??????????????¢??°??¨(??????)
function descendingOrder(val1,val2){
    return val2 - val1;
}
//??°??????
function Int(str){
    return parseInt(str, 10);
}
//????????????
function Str(num){
    return num.toString(10);
}
function output(str){
	if(_Isdebug){
		document.getElementById("input").value+=(str+"\n");
	}
	console.log(str);
}

//???????????°??¨
var _Isdebug = false;

function debug(){
	_Isdebug =true;
	var input = document.getElementById("input").value;
	Main(input);

}

//?????????????????\??????????????????
Main(require("fs").readFileSync("/dev/stdin", "utf8"));