var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var lines = input.split('\n');

var lineNum = +lines.shift();
for (var i = 0; i < lineNum; i++) {
    var line = lines[i];
    var args = line.split(' ');
    args = args.map(function(k) { return +k; })
    args.sort(function(a, b) { return b - a; });
    if (Math.pow(args[0], 2) == Math.pow(args[1], 2) + Math.pow(args[2], 2)) {
        console.log('YES');
    } else {
        console.log('NO');
    }
}