var input = [];
var dataCount;
var data;
process.stdin.resume();
process.stdin.setEncoding("utf8");
process.stdin.on('data', function(chunk){
   input = chunk.toString("utf8").split("\n");
});
process.stdin.on('end', function(){
    dataCount = parseInt(input.shift());
    for (var i = 0; i < dataCount; i++) {
        data = input[i].split(" ").map(Number).sort(function(a,b){
            if (a < b) return -1;
            if (a > b) return 1;
            return 0;
        });
        if (Math.pow(data[0],2) + Math.pow(data[1],2) == Math.pow(data[2],2)) {
            console.log("YES")
        }else{
            console.log("NO")
        }
    }
});