var sample_input = require('fs').readFileSync('/dev/stdin', 'utf8');
var triangles = (sample_input.trim()).split("\n");
triangles.shift();
triangles.forEach(function(triangle){
  var sides = triangle.split(" ").map(Number);
  sides.sort( function(a,b) { return a-b; } );
  var is_right="";
  is_right=(sides[2]*sides[2]==sides[0]*sides[0]+sides[1]*sides[1]) ? "YES" : "NO";
  console.log(is_right);
});