import std.algorithm, std.conv, std.range, std.stdio, std.string;

void main()
{
  auto n = readln.chomp.to!size_t;
  foreach (_; n.iota) {
    auto rd = readln.split.to!(int[]);
    writeln(isRightTriangle(rd[0], rd[1], rd[2]) ? "YES" : "NO");
  }
}

bool isRightTriangle(int a, int b, int c)
{
  return
    a ^^ 2 == b ^^ 2 + c ^^ 2 ||
    b ^^ 2 == c ^^ 2 + a ^^ 2 ||
    c ^^ 2 == a ^^ 2 + b ^^ 2;
}