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

void main() {
  auto n = readln.chomp.to!int;

  for (int i = 0; i < n; i++) {
    auto tri = readln.chomp.split.map!(to!int).array.sort;

    if (pow(tri[0], 2) + pow(tri[1], 2) == pow(tri[2], 2)) {
      writeln("YES");
    } else {
      writeln("NO");
    }
  }
}