// tested on node version 0.10.36
var fs = require("fs");
function is_right_abc(a, b, c) {
    return a*a + b*b === c*c;
}
function is_right(a, b, c) {
    return is_right_abc(a, b, c) || is_right_abc(b, c, a) || is_right_abc(c, a, b);
}

var input = fs.readFileSync('/dev/stdin').toString();
var lines = input.split("\n");
var count = parseInt(lines.shift());
for(var i = 0; i < count; i++) {
    var parts = lines[i].split(" ");
    var a = parseInt(parts.shift());
    var b = parseInt(parts.shift());
    var c = parseInt(parts.shift());
    if(!isNaN(a + b + c)) {
        console.log(is_right(a, b, c) ? "YES" : "NO");
    }
}