import std.stdio;
import std.string;
import std.conv;

immutable MAX_INPUT = 1000;
immutable MAX_COUNT = 1000;

int main(string[] argv)
{
	
	int Count;
	string[] Ans;

	Count = readln().chomp().to!int();
	if(Count <= MAX_COUNT){

		for(int i = 0;i < Count;i++){

			string[] tmp = readln().chomp().split(" ");
			int[3] rect;

			rect[0] = tmp[0].to!int();
			rect[1] = tmp[1].to!int();
			rect[2] = tmp[2].to!int();

			foreach(int j;rect){
				if (!judge(j)) break;
			}

			for(int j = 0;j < 3;j++){
				if(rect[0] < rect[j]){
					int t = rect[0];
					rect[0] = rect[j];
					rect[j] = t;
				}
			}

			if(isTriangle(rect[1],rect[2],rect[0])){
				Ans ~= "YES";
			}else{
				Ans ~= "NO";
			}

		}

	}

	foreach(string str;Ans){
		writeln(str);
	}

    return 0;
}

bool judge(int x){
	if(1 <= x && x <= MAX_INPUT){
		return true;
	}
	return false;
}

bool isTriangle(int x,int y,int z){
	x = x * x;
	y = y * y;
	z = z * z;

	if (x + y == z){
		return true;
	}
	return false;
}