import java.util.Arrays;
import java.util.Scanner;

class Main {
    private static boolean isRightTriangle(int a, int b, int c) {
        return a * a + b * b == c * c;
    }

    private static void solve() {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        while (n-- > 0) {
            int[] triangle = new int[3];
            for (int i = 0; i < 3; i++) {
                triangle[i] = scanner.nextInt();
            }
            Arrays.sort(triangle);
            if (isRightTriangle(triangle[0], triangle[1], triangle[2])) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }

    public static void main(String... args) {
        solve();
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util class Main {
    private static boolean isRightTriangle(int a, int b, int c) {
        return a * a + b * b == c * c;
    }

    private static void solve() {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        while (n-- > 0) {
            int[] triangle = new int[3];
            for (int i = 0; i < 3; i++) {
                triangle[i] = scanner.nextInt();
            }
            Arrays.sort(triangle);
            if (isRightTriangle(triangle[0], triangle[1], triangle[2])) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }

    public static void main(String... args) {
        solve();
    }
} Main private static boolean isRightTriangle(int a, int b, int c) {
        return a * a + b * b == c * c;
    } isRightTriangle {
        return a * a + b * b == c * c;
    } return a * a + b * b == c * c; a * a + b * b == c * c a * a + b * b a * a a a b * b b b c * c c c int a a int b b int c c private static void solve() {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        while (n-- > 0) {
            int[] triangle = new int[3];
            for (int i = 0; i < 3; i++) {
                triangle[i] = scanner.nextInt();
            }
            Arrays.sort(triangle);
            if (isRightTriangle(triangle[0], triangle[1], triangle[2])) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    } solve {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        while (n-- > 0) {
            int[] triangle = new int[3];
            for (int i = 0; i < 3; i++) {
                triangle[i] = scanner.nextInt();
            }
            Arrays.sort(triangle);
            if (isRightTriangle(triangle[0], triangle[1], triangle[2])) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner while (n-- > 0) {
            int[] triangle = new int[3];
            for (int i = 0; i < 3; i++) {
                triangle[i] = scanner.nextInt();
            }
            Arrays.sort(triangle);
            if (isRightTriangle(triangle[0], triangle[1], triangle[2])) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        } n-- > 0 n-- n 0 {
            int[] triangle = new int[3];
            for (int i = 0; i < 3; i++) {
                triangle[i] = scanner.nextInt();
            }
            Arrays.sort(triangle);
            if (isRightTriangle(triangle[0], triangle[1], triangle[2])) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        } int[] triangle = new int[3]; triangle new int[3] 3 for (int i = 0; i < 3; i++) {
                triangle[i] = scanner.nextInt();
            } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
                triangle[i] = scanner.nextInt();
            } {
                triangle[i] = scanner.nextInt();
            } triangle[i] = scanner.nextInt() triangle[i] triangle i scanner.nextInt() scanner.nextInt scanner Arrays.sort(triangle) Arrays.sort Arrays triangle if (isRightTriangle(triangle[0], triangle[1], triangle[2])) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            } isRightTriangle(triangle[0], triangle[1], triangle[2]) isRightTriangle triangle[0] triangle 0 triangle[1] triangle 1 triangle[2] triangle 2 {
                System.out.println("YES");
            } System.out.println("YES") System.out.println System.out System System.out "YES" {
                System.out.println("NO");
            } System.out.println("NO") System.out.println System.out System System.out "NO" public static void main(String... args) {
        solve();
    } main {
        solve();
    } solve() solve String... args args
import java.util.Arrays;
import java.util.Scanner;

class Main {
    private static boolean isRightTriangle(int a, int b, int c) {
        return a * a + b * b == c * c;
    }

    private static void solve() {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        while (n-- > 0) {
            int[] triangle = new int[3];
            for (int i = 0; i < 3; i++) {
                triangle[i] = scanner.nextInt();
            }
            Arrays.sort(triangle);
            if (isRightTriangle(triangle[0], triangle[1], triangle[2])) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }

    public static void main(String... args) {
        solve();
    }
}