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

void main() {
  auto N = readln.chomp.to!int;
  foreach (i; 0..N) {
    auto a = readln.split.to!(int[]).map!(a => a * a).array;
    writeln((a[0] + a[1] == a[2]
        || a[1] + a[2] == a[0]
        || a[2] + a[0] == a[1]) ? "YES" : "NO");
  }
}