//config = {stdin: 'tmp', newline: '\r\n'}; // win
config = {stdin: '/dev/stdin', newline: '\n'}; // linux

line = require('fs').readFileSync(config.stdin, 'ascii')
	.trim()
	.split(config.newline)
	;
line.shift();
line = line.map(function (line) {
	var ary = line.split(' ').map(Number);
	ary.sort(function (a, b) { return b - a; });
	if (sqr(ary[0]) === sqr(ary[1]) + sqr(ary[2])) return 'YES';
	else return 'NO';
});

console.log(line.join('\n'));

function sqr(x) { return x * x; }