import java.io.PrintStream;
import java.util.Arrays;
import java.util.Scanner;

class Main {

    public static void main(String[] args) {
        doit(args, new Scanner(System.in), System.out);
    }

    static void doit(String[] args, Scanner scanner, PrintStream out) {
        int n = scanner.nextInt();
        for (int i = 0; i < n; i++) {
            int[] lengths = { scanner.nextInt(), scanner.nextInt(),
                    scanner.nextInt() };
            Arrays.sort(lengths);
            String result = lengths[0] * lengths[0] + lengths[1] * lengths[1] == lengths[2]
                    * lengths[2] ? "YES" : "NO";
            out.println(result);
        }
    }
} import java.io.PrintStream; PrintStream java.io import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util class Main {

    public static void main(String[] args) {
        doit(args, new Scanner(System.in), System.out);
    }

    static void doit(String[] args, Scanner scanner, PrintStream out) {
        int n = scanner.nextInt();
        for (int i = 0; i < n; i++) {
            int[] lengths = { scanner.nextInt(), scanner.nextInt(),
                    scanner.nextInt() };
            Arrays.sort(lengths);
            String result = lengths[0] * lengths[0] + lengths[1] * lengths[1] == lengths[2]
                    * lengths[2] ? "YES" : "NO";
            out.println(result);
        }
    }
} Main public static void main(String[] args) {
        doit(args, new Scanner(System.in), System.out);
    } main {
        doit(args, new Scanner(System.in), System.out);
    } doit(args, new Scanner(System.in), System.out) doit args new Scanner(System.in) System.out System System.out String[] args args static void doit(String[] args, Scanner scanner, PrintStream out) {
        int n = scanner.nextInt();
        for (int i = 0; i < n; i++) {
            int[] lengths = { scanner.nextInt(), scanner.nextInt(),
                    scanner.nextInt() };
            Arrays.sort(lengths);
            String result = lengths[0] * lengths[0] + lengths[1] * lengths[1] == lengths[2]
                    * lengths[2] ? "YES" : "NO";
            out.println(result);
        }
    } doit {
        int n = scanner.nextInt();
        for (int i = 0; i < n; i++) {
            int[] lengths = { scanner.nextInt(), scanner.nextInt(),
                    scanner.nextInt() };
            Arrays.sort(lengths);
            String result = lengths[0] * lengths[0] + lengths[1] * lengths[1] == lengths[2]
                    * lengths[2] ? "YES" : "NO";
            out.println(result);
        }
    } int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner for (int i = 0; i < n; i++) {
            int[] lengths = { scanner.nextInt(), scanner.nextInt(),
                    scanner.nextInt() };
            Arrays.sort(lengths);
            String result = lengths[0] * lengths[0] + lengths[1] * lengths[1] == lengths[2]
                    * lengths[2] ? "YES" : "NO";
            out.println(result);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int[] lengths = { scanner.nextInt(), scanner.nextInt(),
                    scanner.nextInt() };
            Arrays.sort(lengths);
            String result = lengths[0] * lengths[0] + lengths[1] * lengths[1] == lengths[2]
                    * lengths[2] ? "YES" : "NO";
            out.println(result);
        } {
            int[] lengths = { scanner.nextInt(), scanner.nextInt(),
                    scanner.nextInt() };
            Arrays.sort(lengths);
            String result = lengths[0] * lengths[0] + lengths[1] * lengths[1] == lengths[2]
                    * lengths[2] ? "YES" : "NO";
            out.println(result);
        } int[] lengths = { scanner.nextInt(), scanner.nextInt(),
                    scanner.nextInt() }; lengths { scanner.nextInt(), scanner.nextInt(),
                    scanner.nextInt() } scanner.nextInt() scanner.nextInt scanner scanner.nextInt() scanner.nextInt scanner scanner.nextInt() scanner.nextInt scanner Arrays.sort(lengths) Arrays.sort Arrays lengths String result = lengths[0] * lengths[0] + lengths[1] * lengths[1] == lengths[2]
                    * lengths[2] ? "YES" : "NO"; result lengths[0] * lengths[0] + lengths[1] * lengths[1] == lengths[2]
                    * lengths[2] ? "YES" : "NO" lengths[0] * lengths[0] + lengths[1] * lengths[1] == lengths[2]
                    * lengths[2] lengths[0] * lengths[0] + lengths[1] * lengths[1] lengths[0] * lengths[0] lengths[0] lengths 0 lengths[0] lengths 0 lengths[1] * lengths[1] lengths[1] lengths 1 lengths[1] lengths 1 lengths[2]
                    * lengths[2] lengths[2] lengths 2 lengths[2] lengths 2 "YES" "NO" out.println(result) out.println out result String[] args args Scanner scanner scanner PrintStream out out
import java.io.PrintStream;
import java.util.Arrays;
import java.util.Scanner;

class Main {

    public static void main(String[] args) {
        doit(args, new Scanner(System.in), System.out);
    }

    static void doit(String[] args, Scanner scanner, PrintStream out) {
        int n = scanner.nextInt();
        for (int i = 0; i < n; i++) {
            int[] lengths = { scanner.nextInt(), scanner.nextInt(),
                    scanner.nextInt() };
            Arrays.sort(lengths);
            String result = lengths[0] * lengths[0] + lengths[1] * lengths[1] == lengths[2]
                    * lengths[2] ? "YES" : "NO";
            out.println(result);
        }
    }
}