import std.stdio;
import std.conv;
import std.algorithm;
import std.string;
import std.file;
 
int main() {
        int[] hs;
        string l;
        readln();
        while((l = readln()).length >= 2){
                int a, b, c;
                a = to!int(l.split()[0]), b = to!int(l.split()[1]), c = to!int(l.split()[2]);
                if(a * a + b * b == c * c || b * b + c * c == a * a || c * c + a * a == b * b) printf("YES\n");
                else printf("NO\n");
                }
        return 0;
}