import std.stdio;

bool is_right_triangle(int a, int b, int c) {
    return (a * a + b * b) == (c * c);
}


void main() {
    int n;
    readf!"%d\n"(n);
    foreach (i; 0 .. n) {
        int a, b, c;
        readf!"%d %d %d\n"(a, b, c);
        writeln(is_right_triangle(a, b, c) ? "YES" : "NO");
    }
}