process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(chunk){


 var array = (chunk.trim()).split("\n")
 var hen = 3
 

for (var i = 1; i < array.length; i++) {
  var x = array[i].split(" ");
  x.sort(function(d, e){
    return e - d
  })
  if Math.pow(x[0] , 2) = Math.pow(x[1] , 2) + Math.pow(x[2] , 2) {
    console.log("YES");
  } else
    console.log("NO");
  
}



  })