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

void main(){
  int n = readln.strip.to!int;
  foreach(_; 0..n){
    auto a = readln.strip.split.map!(to!int).array.sort;
    auto sq = (int x) => x * x;
    writeln(sq(a[0]) + sq(a[1]) == sq(a[2]) ? "YES" : "NO");
  }
}