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]){
    		console.log("YES");
    	}else{
    		console.log("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 debug(){
	var input = document.getElementById("input").value;
	Main(input);
}

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