Heuristicfunction Main(input){
    input = input.split("\n");
    var n = parseInt(input[0],10);

    for(var i = 0;i < n;i++){
        input[i + 1] = input[i + 1].split(' ');
        var a = parseInt(input[i + 1][0],10);
        var b = parseInt(input[i + 1][1],10);
        var c = parseInt(input[i + 1][2],10);

        if(a > b){
            var ex = a;
            a = b;
            b = ex;
        }
        if(b > c){
            var ex = b;
            b = c;
            c = ex;
        }
        if(a * a + b * b === c * c)
            console.log("YES");
        else
            console.log("NO");
    }
}
Main(require("fs").readFileSync("/dev/stdin","utf8"));