import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
    private final static String NEG = "NO\n";

    private final static String AFF = "YES\n";

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(
                new InputStreamReader(System.in), 1024);
        int number = Integer.parseInt(br.readLine());
        int sides[] = new int[3];
        StringTokenizer tknz;
        StringBuilder builder = new StringBuilder();

        for (; 0 < number; number--) {
            tknz = new StringTokenizer(br.readLine());
            for (int i = 0; i < 3; i++) {
                sides[i] = Integer.parseInt(tknz.nextToken());
            }
            Arrays.sort(sides);
            if (sides[1] % 2 != 0) {
                builder.append(NEG);
            } else if (sides[0] * sides[1] * sides[2] % 60 != 0) {
                builder.append(NEG);
            } else if (Math.pow(sides[0], 2) + Math.pow(sides[1], 2) != Math
                    .pow(sides[2], 2)) {
                builder.append(NEG);
            } else {
                builder.append(AFF);
            }
        }
        System.out.print(builder);
    }
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz