function generateTrianglesFromInput(input) {
  var maxLines = 1000;
  var offset = 1;

  var lines = getInputAsLines(input, "\n");
  var vertices = lines.map(processLineToVertices);
  var limit = (vertices.length < maxLines) ? vertices.length : maxLines;

  for(var i = offset; i <= limit; i++) {
    var vertexLine = vertices[i];
    if(vertexLine && vertexLine.length === 3) {
      var tri = new Triangle({
        constraints: {
          min: 1,
          max: 1000
        },
        vertices: {
          a: vertexLine[0],
          b: vertexLine[1],
          c: vertexLine[2]
        }
      });

      var isRightAngleTriangle = tri.isRightAngleTriangle();
      var logValue = (isRightAngleTriangle) ? 'YES' : 'NO';
      console.log(logValue);
    }
  }
}

function getInputAsLines(input, delimeter) {
  return input.split(delimeter);
}

function processLineToVertices(line) {
  var vertices = line.split(' ');
  return vertices;
}


//Triangle
function Triangle(options) {

  this.constraints = {};
  this.vertices = {};

  //Set up triangle constraints.
  this.constraints.min = options.constraints.min || 1;
  this.constraints.max = options.constraints.max || 1000;

  //Set up triangle vertices
  this.vertices.a = (this.vertexIsWithinConstraints(options.vertices.a)) ? options.vertices.a : null;
  this.vertices.b = (this.vertexIsWithinConstraints(options.vertices.b)) ? options.vertices.b : null;
  this.vertices.c = (this.vertexIsWithinConstraints(options.vertices.c)) ? options.vertices.c : null;

}

Triangle.prototype.vertexIsWithinConstraints = function(vertex) {
  return (vertex >= this.constraints.min && vertex <= this.constraints.max);
}

Triangle.prototype.isRightAngleTriangle = function() {
  var value = false;
  if(this.vertices.a && this.vertices.b && this.vertices.c) {
    var vertexArray = [];
    vertexArray.push(this.vertices.a);
    vertexArray.push(this.vertices.b);
    vertexArray.push(this.vertices.c);

    vertexArray.sort();

    var squares = vertexArray.map((vertex) => Math.pow(vertex, 2));
    value = (squares[2] === (squares[0] + squares[1]));
  }

  return value;
}

var input = require('fs').readFileSync('/dev/stdin', 'utf8');
generateTrianglesFromInput(input);