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

bool isRightTriangle(int a, int b, int c) {
  int a2 = a * a;
  int b2 = b * b;
  int c2 = c * c;

  return a2 + b2 == c2 || b2 + c2 == a2 || c2 + a2 == b2;
}

void main() {
  uint n = to!uint(chomp(readln()));

  int[][] data;
  for(uint i = 0; i < n; i++) {
    auto input = split(readln());

    data ~= [to!int(input[0]), to!int(input[1]), to!int(input[2])];
  }

  foreach(tri; data) {
    if(isRightTriangle(tri[0], tri[1], tri[2])) writeln("YES");
    else writeln("NO");
  }  
}