import std.stdio;
import std.c.stdio;
import std.range;
import std.array;
import std.functional;
import std.algorithm;
import std.conv;
import std.container;
import std.math;
import std.numeric;
import std.string;
import std.c.string;
import std.regex;
import std.typecons;
 
void main() {
    int N; scanf("%d\n", &N);
    foreach (i; 0 .. N) {
        int[] a = new int[3];
        foreach (j; 0 .. 3) scanf("%d", &a[j]);
        sort(a);
        writeln(a[0] * a[0] + a[1] * a[1] == a[2] * a[2] ? "YES" : "NO");
    }
}