process.stdin.resume();
process.stdin.setEncoding('utf8');

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

var number_of_datasets = lines.shift();

for (var dataset = 0; dataset < number_of_datasets; dataset++)
{
var value = "NO"; 
var values = lines[dataset].split(" ");

var a = parseInt(values[0]);
var b = parseInt(values[1]);
var c = parseInt(values[2]);

if ((a*a) + (b*b) === (c*c))
{
value = "YES";
}
if ((a*a) + (c*c) === (b*b))
{
value = "YES";
}
if ((c*c) + (b*b) === (a*a))
{
value = "YES";
}

console.log(value);
}