var N = null, current = 0;
var readline = require('readline');
var rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});
rl.on('line', function(line){
  if (N === null) {
    N = parseInt(line);
    if (N <= 0) process.exit();
  } else {
    current++;
    var components = line.split(' '), i;
    for (i = 0; i < components.length; i++) {
      components[i] = parseInt(components[i]);
    }
    components.sort();
    var a = components[0], b = components[1], c = components[2];
    console.log(a * a + b * b === c * c ? 'YES' : 'NO');
    // if (current >= N) process.exit();
  }
}).resume();