import std.stdio;
import std.array;
import std.algorithm;
import std.conv;
import std.string;


void main()
{
	int inputnum = to!int(chomp(readln()));
	for(int i = 0; i < inputnum; i++)
    {
		string[] input = split(readln());
		int[] side = new int[3];
		side[0] = to!int(input[0]);
		side[1] = to!int(input[1]);
		side[2] = to!int(input[2]);
		static bool smaller(int x,int y)
		{
			return x < y;
		}
		sort!(smaller)(side);
		if(side[0]^^2 + side[1]^^2 == side[2]^^2)
			writeln("YES");
		else
			writeln("NO");
	}
}