var d = require("fs").readFileSync("/dev/stdin", "utf8").trim().split('\n');
for (var i = 0; i < d[0]; i++) {
  lines = d[i+1].split(' ');
  lines.sort();
  console.log(lines[0] * lines[0] + lines[1] * lines[1] === lines[2] * lines[2]? 'YES' : 'NO');
}