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

void main() {
  int n = to!int(chomp(readln()));
  while(n--) {
    string[] l = split(readln());
    int a = to!int(l[0]);
    int b = to!int(l[1]);
    int c = to!int(l[2]);
    if(a*a==b*b+c*c
     ||b*b==c*c+a*a
     ||c*c==a*a+b*b) {
      writeln("YES");
    }
    else {
      writeln("NO");
    }
  }
}