// 標準入力
var fs = require('fs'),
length = fs.fstatSync(process.stdin.fd).size,
buffer = new Buffer(length),
bytesRead = fs.readSync(process.stdin.fd, buffer, 0, length, 0),
input = buffer.toString('utf8', 0, bytesRead).split('\n');
main();
 
// ここから
function main(){
  for(var line = 1, maxLines = input[0] - 0; line <= maxLines; line++){
    var inputArray = new Int32Array(input[line].split(" ").sort());
    console.log((Math.pow(inputArray[2], 2) == Math.pow(inputArray[1], 2) + Math.pow(inputArray[0], 2)) ? 'YES' : 'NO');
  }
}